Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 authored and tobiasKaminsky committed Aug 23, 2024
1 parent 27d2970 commit e78f48a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ private void setupDrawerMenu(NavigationView navigationView) {
return true;
});


User account = accountManager.getUser();
filterDrawerMenu(navigationView.getMenu(), account);
}
Expand Down Expand Up @@ -1050,6 +1051,10 @@ protected void onPostCreate(Bundle savedInstanceState) {
updateQuotaLink();
}

public int getCheckedMenuItem() {
return mCheckedMenuItem;
}

@Override
public void onConfigurationChanged(@NonNull Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,12 @@ private void setDrawerAllFiles() {
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();
}
}
Expand Down

0 comments on commit e78f48a

Please sign in to comment.