mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-25 07:08:30 +01:00
Moved ordering to setup
This commit is contained in:
@@ -173,14 +173,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
}
|
||||
}).setSeparated());
|
||||
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_palette_24, R.string.title_setup_theme, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onMenuTheme();
|
||||
}
|
||||
}));
|
||||
|
||||
if (getIntentNotifications(this).resolveActivity(pm) != null)
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_notifications_24, R.string.title_setup_notifications, new Runnable() {
|
||||
@Override
|
||||
@@ -190,11 +182,27 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
}
|
||||
}));
|
||||
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_settings_applications_24, R.string.title_setup_advanced, new Runnable() {
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_reorder_24, R.string.title_setup_reorder_accounts, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onMenuOptions();
|
||||
onMenuOrder(R.string.title_setup_reorder_accounts, EntityAccount.class);
|
||||
}
|
||||
}));
|
||||
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_reorder_24, R.string.title_setup_reorder_folders, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onMenuOrder(R.string.title_setup_reorder_folders, TupleFolderSort.class);
|
||||
}
|
||||
}));
|
||||
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_palette_24, R.string.title_setup_theme, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onMenuTheme();
|
||||
}
|
||||
}));
|
||||
|
||||
@@ -204,6 +212,14 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onMenuContacts();
|
||||
}
|
||||
}));
|
||||
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_settings_applications_24, R.string.title_setup_advanced, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
drawerLayout.closeDrawer(drawerContainer);
|
||||
onMenuOptions();
|
||||
}
|
||||
}).setSeparated());
|
||||
|
||||
menus.add(new NavMenuItem(R.drawable.baseline_help_24, R.string.menu_legend, new Runnable() {
|
||||
@@ -342,10 +358,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
handleImport(data, this.password);
|
||||
}
|
||||
|
||||
private void onManageNotifications() {
|
||||
startActivity(getIntentNotifications(this));
|
||||
}
|
||||
|
||||
private void onMenuExport() {
|
||||
if (Helper.isPro(this))
|
||||
try {
|
||||
@@ -403,6 +415,26 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
.show();
|
||||
}
|
||||
|
||||
private void onManageNotifications() {
|
||||
startActivity(getIntentNotifications(this));
|
||||
}
|
||||
|
||||
private void onMenuOrder(int title, Class clazz) {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("order", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putInt("title", title);
|
||||
args.putString("class", clazz.getName());
|
||||
|
||||
FragmentOrder fragment = new FragmentOrder();
|
||||
fragment.setArguments(args);
|
||||
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("order");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuTheme() {
|
||||
View dview = LayoutInflater.from(this).inflate(R.layout.dialog_theme, null);
|
||||
final RadioGroup rgTheme = dview.findViewById(R.id.rgTheme);
|
||||
@@ -449,15 +481,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
.show();
|
||||
}
|
||||
|
||||
private void onMenuOptions() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("options", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentOptions()).addToBackStack("options");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuContacts() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("contacts", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
@@ -467,6 +490,15 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuOptions() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("options", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentOptions()).addToBackStack("options");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuLegend() {
|
||||
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
||||
getSupportFragmentManager().popBackStack("legend", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
||||
|
||||
Reference in New Issue
Block a user