mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 08:33:37 +02:00
Navigation from accounts/folders to unified inbox
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user