Reordered navigation menus

pull/147/head
M66B 6 years ago
parent f628fa0942
commit 62e1d8eedb

@ -132,9 +132,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
case R.string.title_setup_help:
onMenuHelp();
break;
case R.string.title_setup_notifications:
onManageNotifications();
break;
case R.string.title_setup_export:
onMenuExport();
break;
@ -146,6 +143,9 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
case R.string.title_setup_black_theme:
onMenuTheme(item.getId());
break;
case R.string.title_setup_notifications:
onManageNotifications();
break;
case R.string.title_setup_advanced:
onMenuOptions();
break;
@ -175,9 +175,6 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
if (getIntentNotifications(this).resolveActivity(pm) != null)
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_notifications_24, R.string.title_setup_notifications));
if (getIntentExport().resolveActivity(pm) != null)
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_archive_24, R.string.title_setup_export));
if (getIntentImport().resolveActivity(pm) != null)
@ -192,6 +189,9 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
else
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_palette_24, R.string.title_setup_dark_theme));
if (getIntentNotifications(this).resolveActivity(pm) != null)
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_notifications_24, R.string.title_setup_notifications));
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_settings_applications_24, R.string.title_setup_advanced));
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));

@ -176,24 +176,24 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
case -1:
onMenuFolders((long) item.getData());
break;
case R.string.menu_setup:
onMenuSetup();
break;
case R.string.menu_answers:
onMenuAnswers();
break;
case R.string.menu_operations:
onMenuOperations();
break;
case R.string.menu_pro:
onMenuPro();
break;
case R.string.menu_setup:
onMenuSetup();
break;
case R.string.menu_legend:
onMenuLegend();
break;
case R.string.menu_faq:
onMenuFAQ();
break;
case R.string.menu_pro:
onMenuPro();
break;
case R.string.menu_privacy:
onMenuPrivacy();
break;
@ -222,12 +222,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
case -1:
onMenuInbox((long) item.getData());
break;
case R.string.menu_setup:
onReload();
break;
case R.string.menu_operations:
onShowLog();
break;
case R.string.menu_setup:
onReload();
break;
case R.string.menu_faq:
onDebugInfo();
break;
@ -295,21 +295,22 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_settings_applications_24, R.string.menu_setup));
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_reply_24, R.string.menu_answers));
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_list_24, R.string.menu_operations));
Intent pro = getIntentPro();
if (pro == null || pro.resolveActivity(getPackageManager()) != null)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_monetization_on_24, R.string.menu_pro));
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_settings_applications_24, R.string.menu_setup));
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_list_24, R.string.menu_operations));
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_help_24, R.string.menu_legend));
if (Helper.getIntentFAQ().resolveActivity(getPackageManager()) != null)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_question_answer_24, R.string.menu_faq));
Intent pro = getIntentPro();
if (pro == null || pro.resolveActivity(getPackageManager()) != null)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_monetization_on_24, R.string.menu_pro));
if (Helper.getIntentPrivacy().resolveActivity(getPackageManager()) != null)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_account_box_24, R.string.menu_privacy));
@ -854,10 +855,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
}.execute(this, args, "menu:inbox");
}
private void onMenuSetup() {
startActivity(new Intent(ActivityView.this, ActivitySetup.class));
}
private void onMenuAnswers() {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentAnswers()).addToBackStack("answers");
@ -870,22 +867,26 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
fragmentTransaction.commit();
}
private void onMenuLegend() {
private void onMenuPro() {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentLegend()).addToBackStack("legend");
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
private void onMenuFAQ() {
Helper.view(this, this, Helper.getIntentFAQ());
private void onMenuSetup() {
startActivity(new Intent(ActivityView.this, ActivitySetup.class));
}
private void onMenuPro() {
private void onMenuLegend() {
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.replace(R.id.content_frame, new FragmentLegend()).addToBackStack("legend");
fragmentTransaction.commit();
}
private void onMenuFAQ() {
Helper.view(this, this, Helper.getIntentFAQ());
}
private void onMenuPrivacy() {
Helper.view(this, this, Helper.getIntentPrivacy());
}

Loading…
Cancel
Save