Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-08-14 14:00:31 +02:00 committed by Alper Öztürk
parent 78e8294132
commit 487bb7b46a
2 changed files with 11 additions and 1 deletions

View file

@ -462,6 +462,7 @@ public abstract class DrawerActivity extends ToolbarActivity
return true;
});
User account = accountManager.getUser();
filterDrawerMenu(navigationView.getMenu(), account);
}
@ -1052,6 +1053,10 @@ public abstract class DrawerActivity extends ToolbarActivity
updateQuotaLink();
}
public int getCheckedMenuItem() {
return mCheckedMenuItem;
}
@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);

View file

@ -1168,7 +1168,12 @@ public class FileDisplayActivity extends FileActivity
setDrawerMenuItemChecked(R.id.nav_on_device);
setupToolbar();
} else {
setDrawerMenuItemChecked(R.id.nav_all_files);
int lastMenuItem = getCheckedMenuItem();
if (lastMenuItem == Menu.NONE) {
lastMenuItem = R.id.nav_all_files;
}
setDrawerMenuItemChecked(lastMenuItem);
setupHomeSearchToolbarWithSortAndListButtons();
}
}