From ce1686a1d7d76ec97dd8d8a02a58a88ebfc343bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 25 Jan 2024 14:55:55 +0900 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=9D=A1=E4=BB=B6=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/common/LacertaSelectDirDialog.java | 10 +++++----- .../component/common/SelectDirDialogItemAdapter.java | 10 +++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/LacertaSelectDirDialog.java b/component/common/src/main/java/one/nem/lacerta/component/common/LacertaSelectDirDialog.java index 446a8fd5..414fe8a5 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/LacertaSelectDirDialog.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/LacertaSelectDirDialog.java @@ -88,18 +88,18 @@ public class LacertaSelectDirDialog extends DialogFragment { getActivity().runOnUiThread(() -> { int currentCount = adapter.getItemCount(); String currentDirId = adapter.getCurrentId(); - if (currentDirId == null && libraryItemPage.getPageId() != null) { - // Rootから推移してきた場合 + if (currentDirId == null) { + // Rootが関わる推移 (Rootからの推移) adapter.setListItems(libraryItemPage); adapter.notifyItemRangeRemoved(0, currentCount); adapter.notifyItemRangeInserted(0, libraryItemPage.getListItems().size()); } else if (libraryItemPage.getPageId() == null) { - // Rootに推移した場合 + // Rootが関わる推移 (Rootへの推移) adapter.setListItems(libraryItemPage); adapter.notifyItemRangeRemoved(0, currentCount); adapter.notifyItemRangeInserted(0, libraryItemPage.getListItems().size()); - } else if (currentDirId != null && libraryItemPage.getPageId() != null) { - // 通常の遷移 + } else if (libraryItemPage.getPageId() != null) { + // Rootが関わらない推移 adapter.setListItems(libraryItemPage); adapter.notifyItemRangeRemoved(1, currentCount); adapter.notifyItemRangeInserted(1, libraryItemPage.getListItems().size()); diff --git a/component/common/src/main/java/one/nem/lacerta/component/common/SelectDirDialogItemAdapter.java b/component/common/src/main/java/one/nem/lacerta/component/common/SelectDirDialogItemAdapter.java index 4cbe7d8e..f6fd1a06 100644 --- a/component/common/src/main/java/one/nem/lacerta/component/common/SelectDirDialogItemAdapter.java +++ b/component/common/src/main/java/one/nem/lacerta/component/common/SelectDirDialogItemAdapter.java @@ -59,7 +59,15 @@ public class SelectDirDialogItemAdapter extends RecyclerView.Adapter