mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
fix
This commit is contained in:
parent
e51ce209dc
commit
58f9d81555
|
@ -83,9 +83,15 @@ public class LacertaSelectDirDialog extends DialogFragment {
|
||||||
lacertaLibrary.getFolderList(targetDirId).thenAccept(libraryItemPage -> {
|
lacertaLibrary.getFolderList(targetDirId).thenAccept(libraryItemPage -> {
|
||||||
getActivity().runOnUiThread(() -> {
|
getActivity().runOnUiThread(() -> {
|
||||||
int currentCount = adapter.getItemCount();
|
int currentCount = adapter.getItemCount();
|
||||||
adapter.notifyItemRangeRemoved(1, currentCount); // Backボタンを除くすべてのアイテムを削除
|
if (targetDirId == null) { // When root folder
|
||||||
adapter.setListItems(libraryItemPage);
|
adapter.setListItems(libraryItemPage);
|
||||||
adapter.notifyItemRangeInserted(1, libraryItemPage.getListItems().size());
|
adapter.notifyItemRangeRemoved(0, currentCount);
|
||||||
|
adapter.notifyItemRangeInserted(0, libraryItemPage.getListItems().size());
|
||||||
|
} else { // When child folder
|
||||||
|
adapter.setListItems(libraryItemPage);
|
||||||
|
adapter.notifyItemRangeRemoved(1, currentCount);
|
||||||
|
adapter.notifyItemRangeInserted(1, libraryItemPage.getListItems().size());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user