mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-03 15:46:34 +02:00
Navigation from accounts/folders to unified inbox
This commit is contained in:
@@ -297,6 +297,7 @@ public class FragmentAccounts extends FragmentBase {
|
||||
@Override
|
||||
public void onPrepareOptionsMenu(Menu menu) {
|
||||
menu.findItem(R.id.menu_search).setVisible(!settings);
|
||||
menu.findItem(R.id.menu_unified).setVisible(!settings);
|
||||
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
}
|
||||
@@ -307,6 +308,9 @@ public class FragmentAccounts extends FragmentBase {
|
||||
case R.id.menu_search:
|
||||
onMenuSearch();
|
||||
return true;
|
||||
case R.id.menu_unified:
|
||||
onMenuUnified();
|
||||
return true;
|
||||
case R.id.menu_force_sync:
|
||||
onMenuForceSync();
|
||||
return true;
|
||||
@@ -323,6 +327,15 @@ public class FragmentAccounts 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 onMenuForceSync() {
|
||||
ServiceSynchronize.reload(getContext(), null, true, "force sync");
|
||||
ToastEx.makeText(getContext(), R.string.title_executing, Toast.LENGTH_LONG).show();
|
||||
|
||||
Reference in New Issue
Block a user