mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-21 23:43:15 +00:00
削除した後フリーズしないように(Workaround)
This commit is contained in:
parent
9288360eb4
commit
2fcab4e931
|
@ -320,7 +320,6 @@ public class LibraryPageFragment extends Fragment {
|
|||
toolbar.setNavigationIcon(null);
|
||||
}
|
||||
|
||||
if (this.folderId == null) toolbar.getMenu().findItem(R.id.menu_item_delete_folder).setVisible(false); // ルートフォルダの場合は削除ボタンを非表示にする
|
||||
toolbar.setTitle(title);
|
||||
toolbar.getMenu().clear();
|
||||
toolbar.inflateMenu(R.menu.dir_menu);
|
||||
|
@ -349,12 +348,23 @@ public class LibraryPageFragment extends Fragment {
|
|||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (this.folderId == null) toolbar.getMenu().findItem(R.id.menu_item_delete_folder).setVisible(false); // ルートフォルダの場合は削除ボタンを非表示にする
|
||||
});
|
||||
}
|
||||
|
||||
private void deleteMe() {
|
||||
lacertaLibrary.deleteFolder(this.folderId).thenAccept(aVoid -> {
|
||||
Navigation.findNavController(requireView()).popBackStack();
|
||||
// Move to root
|
||||
getActivity().runOnUiThread(() -> {
|
||||
Navigation.findNavController(requireView()).popBackStack(R.id.feature_library_top_fragment, false);
|
||||
|
||||
// Refresh
|
||||
updateItem(this.folderId);
|
||||
|
||||
// Update toolbar
|
||||
toolbarSetup(this.toolbar, false, "ライブラリ");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user