mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 23:50:58 +01:00
Added local contacts display
This commit is contained in:
@@ -195,6 +195,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
case R.string.menu_operations:
|
||||
onMenuOperations();
|
||||
break;
|
||||
case R.string.menu_contacts:
|
||||
onMenuContacts();
|
||||
break;
|
||||
case R.string.menu_setup:
|
||||
onMenuSetup();
|
||||
break;
|
||||
@@ -346,20 +349,21 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
nf.format(operations));
|
||||
items.add(new DrawerItem(-3, R.string.menu_operations, R.drawable.baseline_list_24, title, operations > 0));
|
||||
|
||||
items.add(new DrawerItem(-4, R.drawable.baseline_settings_applications_24, R.string.menu_setup));
|
||||
items.add(new DrawerItem(-5));
|
||||
items.add(new DrawerItem(-6, R.drawable.baseline_help_24, R.string.menu_legend));
|
||||
items.add(new DrawerItem(-4, R.drawable.baseline_person_24, R.string.menu_contacts));
|
||||
items.add(new DrawerItem(-5, R.drawable.baseline_settings_applications_24, R.string.menu_setup));
|
||||
items.add(new DrawerItem(-6));
|
||||
items.add(new DrawerItem(-7, R.drawable.baseline_help_24, R.string.menu_legend));
|
||||
|
||||
if (Helper.getIntentFAQ().resolveActivity(getPackageManager()) != null)
|
||||
items.add(new DrawerItem(-7, R.drawable.baseline_question_answer_24, R.string.menu_faq));
|
||||
items.add(new DrawerItem(-8, R.drawable.baseline_question_answer_24, R.string.menu_faq));
|
||||
|
||||
if (BuildConfig.BETA_RELEASE)
|
||||
items.add(new DrawerItem(-8, R.drawable.baseline_report_problem_24, R.string.menu_issue));
|
||||
items.add(new DrawerItem(-9, R.drawable.baseline_report_problem_24, R.string.menu_issue));
|
||||
|
||||
if (Helper.getIntentPrivacy().resolveActivity(getPackageManager()) != null)
|
||||
items.add(new DrawerItem(-9, R.drawable.baseline_account_box_24, R.string.menu_privacy));
|
||||
items.add(new DrawerItem(-10, R.drawable.baseline_account_box_24, R.string.menu_privacy));
|
||||
|
||||
items.add(new DrawerItem(-10, R.drawable.baseline_info_24, R.string.menu_about));
|
||||
items.add(new DrawerItem(-11, R.drawable.baseline_info_24, R.string.menu_about));
|
||||
|
||||
boolean pro = (getIntentPro() == null || getIntentPro().resolveActivity(getPackageManager()) != null);
|
||||
boolean invite = (getIntentInvite().resolveActivity(getPackageManager()) != null);
|
||||
@@ -367,19 +371,19 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
boolean other = (getIntentOtherApps().resolveActivity(getPackageManager()) != null);
|
||||
|
||||
if (pro || invite || rate || other)
|
||||
items.add(new DrawerItem(-11));
|
||||
items.add(new DrawerItem(-12));
|
||||
|
||||
if (pro)
|
||||
items.add(new DrawerItem(-12, R.drawable.baseline_monetization_on_24, R.string.menu_pro));
|
||||
items.add(new DrawerItem(-13, R.drawable.baseline_monetization_on_24, R.string.menu_pro));
|
||||
|
||||
if (invite)
|
||||
items.add(new DrawerItem(-13, R.drawable.baseline_people_24, R.string.menu_invite));
|
||||
items.add(new DrawerItem(-14, R.drawable.baseline_people_24, R.string.menu_invite));
|
||||
|
||||
if (rate)
|
||||
items.add(new DrawerItem(-14, R.drawable.baseline_star_24, R.string.menu_rate));
|
||||
items.add(new DrawerItem(-15, R.drawable.baseline_star_24, R.string.menu_rate));
|
||||
|
||||
if (other)
|
||||
items.add(new DrawerItem(-15, R.drawable.baseline_get_app_24, R.string.menu_other));
|
||||
items.add(new DrawerItem(-16, R.drawable.baseline_get_app_24, R.string.menu_other));
|
||||
|
||||
drawerArray.set(items);
|
||||
}
|
||||
@@ -957,6 +961,12 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuContacts() {
|
||||
FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentContacts()).addToBackStack("contacts");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuSetup() {
|
||||
startActivity(new Intent(ActivityView.this, ActivitySetup.class));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user