Navigation from accounts/folders to unified inbox

This commit is contained in:
M66B
2020-12-01 22:03:19 +01:00
parent e7a9266b2b
commit 7debdd47c3
4 changed files with 38 additions and 0 deletions

View File

@@ -451,6 +451,7 @@ public class FragmentFolders extends FragmentBase {
boolean subscriptions = prefs.getBoolean("subscriptions", false);
boolean subscribed_only = prefs.getBoolean("subscribed_only", false);
menu.findItem(R.id.menu_unified).setVisible(account < 0 && !primary);
menu.findItem(R.id.menu_compact).setChecked(compact);
menu.findItem(R.id.menu_show_hidden).setChecked(show_hidden);
menu.findItem(R.id.menu_show_flagged).setChecked(show_flagged);
@@ -467,6 +468,9 @@ public class FragmentFolders extends FragmentBase {
case R.id.menu_search:
onMenuSearch();
return true;
case R.id.menu_unified:
onMenuUnified();
return true;
case R.id.menu_compact:
onMenuCompact();
return true;
@@ -499,6 +503,15 @@ public class FragmentFolders extends FragmentBase {
fragment.show(getParentFragmentManager(), "search");
}
private void onMenuUnified() {
FragmentMessages fragment = new FragmentMessages();
fragment.setArguments(new Bundle());
FragmentTransaction fragmentTransaction = getParentFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("messages");
fragmentTransaction.commit();
}
private void onMenuCompact() {
compact = !compact;