Allow to set Menu.NONE

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-09-04 12:07:09 +02:00 committed by Alper Öztürk
parent 5cb2e3a410
commit 06ad7d0239
2 changed files with 8 additions and 10 deletions

View file

@ -871,7 +871,7 @@ public abstract class DrawerActivity extends ToolbarActivity
*
*/
public void setDrawerMenuItemChecked() {
if (menuItemId == Menu.NONE || mNavigationView == null) {
if (mNavigationView == null) {
return;
}

View file

@ -1158,22 +1158,20 @@ public class FileDisplayActivity extends FileActivity
Log_OC.v(TAG, "onResume() end");
}
private void setDrawerAllFiles() {
if (MainApp.isOnlyPersonFiles()) {
menuItemId = R.id.nav_personal_files;
setDrawerMenuItemChecked();
setupHomeSearchToolbarWithSortAndListButtons();
} else if (MainApp.isOnlyOnDevice()) {
menuItemId = R.id.nav_on_device;
setDrawerMenuItemChecked();
} else if (menuItemId == Menu.NONE) {
menuItemId = R.id.nav_all_files;
}
setDrawerMenuItemChecked();
if (MainApp.isOnlyOnDevice()) {
setupToolbar();
} else {
if (menuItemId == Menu.NONE) {
menuItemId = R.id.nav_all_files;
}
setDrawerMenuItemChecked();
setupHomeSearchToolbarWithSortAndListButtons();
}
}