From 9d750b52443c805b77c794a11d0ccac495747246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 26 Jan 2024 18:33:44 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=83=95=E3=82=A1=E3=82=AF=E3=82=BF?= =?UTF-8?q?=E3=83=AA=E3=83=B3=E3=82=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/library/LibraryPageFragment.java | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryPageFragment.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryPageFragment.java index 0bf1c21a..5e0e5b2f 100644 --- a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryPageFragment.java +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryPageFragment.java @@ -178,33 +178,7 @@ public class LibraryPageFragment extends Fragment { // Get library page and update RecyclerView items - lacertaLibrary.getLibraryPage(this.folderId, 10).thenAccept(libraryItemPage -> { - this.libraryItemPage = libraryItemPage; - - if (this.parentId == null) { - this.parentId = libraryItemPage.getParentId(); - } - if (this.title == null) { - this.title = libraryItemPage.getPageTitle(); - // Toolbar init again - toolbarSetup(view.findViewById(R.id.library_toolbar), this.folderId != null, this.title != null ? this.title : "ライブラリ"); - } - - logger.debug("LibraryTopFragment", "Item selected! Total item page: " + this.libraryItemPage.getListItems().size()); - if (!FeatureSwitch.RecyclerView.useSimpleNotifyMethod) { - getActivity().runOnUiThread(() -> { // TODO-rca: 実行条件を考える? - listItemAdapter.notifyItemRangeRemoved(0, this.libraryItemPage.getListItems().size() - 1); - }); - } - listItemAdapter.setLibraryItemPage(this.libraryItemPage); - getActivity().runOnUiThread(() -> { - if (FeatureSwitch.RecyclerView.useSimpleNotifyMethod) { - listItemAdapter.notifyDataSetChanged(); - } else { - listItemAdapter.notifyItemRangeInserted(0, this.libraryItemPage.getListItems().size() - 1); - } - }); - }); + updateItem(this.folderId); } /**