|
|
|
@ -300,7 +300,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
!Objects.equals(account.name, other.name) ||
|
|
|
|
|
!Objects.equals(account.color, other.color) ||
|
|
|
|
|
!Objects.equals(account.state, other.state) ||
|
|
|
|
|
account.unseen != other.unseen) {
|
|
|
|
|
account.unseen != other.unseen ||
|
|
|
|
|
account.operations != other.operations) {
|
|
|
|
|
changed = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -314,6 +315,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
|
|
|
|
|
List<DrawerItem> items = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
int operations = 0;
|
|
|
|
|
for (TupleAccountEx account : accounts) {
|
|
|
|
|
String title;
|
|
|
|
|
if (account.unseen > 0)
|
|
|
|
@ -324,26 +326,36 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
"connected".equals(account.state)
|
|
|
|
|
? account.primary ? R.drawable.baseline_folder_special_24 : R.drawable.baseline_folder_24
|
|
|
|
|
: R.drawable.baseline_folder_open_24,
|
|
|
|
|
account.color, title, account.unseen > 0));
|
|
|
|
|
title, account.color, account.unseen > 0));
|
|
|
|
|
operations += account.operations;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
items.add(new DrawerItem(-1));
|
|
|
|
|
items.add(new DrawerItem(-2, R.string.menu_answers, R.drawable.baseline_reply_24));
|
|
|
|
|
items.add(new DrawerItem(-3, R.string.menu_operations, R.drawable.baseline_list_24));
|
|
|
|
|
items.add(new DrawerItem(-4, R.string.menu_setup, R.drawable.baseline_settings_applications_24));
|
|
|
|
|
items.add(new DrawerItem(-2, R.drawable.baseline_reply_24, R.string.menu_answers));
|
|
|
|
|
|
|
|
|
|
String title;
|
|
|
|
|
if (operations == 0)
|
|
|
|
|
title = getString(R.string.menu_operations);
|
|
|
|
|
else
|
|
|
|
|
title = getString(R.string.title_name_count,
|
|
|
|
|
getString(R.string.menu_operations),
|
|
|
|
|
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.string.menu_legend, R.drawable.baseline_help_24));
|
|
|
|
|
items.add(new DrawerItem(-6, R.drawable.baseline_help_24, R.string.menu_legend));
|
|
|
|
|
|
|
|
|
|
if (Helper.getIntentFAQ().resolveActivity(getPackageManager()) != null)
|
|
|
|
|
items.add(new DrawerItem(-7, R.string.menu_faq, R.drawable.baseline_question_answer_24));
|
|
|
|
|
items.add(new DrawerItem(-7, R.drawable.baseline_question_answer_24, R.string.menu_faq));
|
|
|
|
|
|
|
|
|
|
if (BuildConfig.BETA_RELEASE)
|
|
|
|
|
items.add(new DrawerItem(-8, R.string.menu_issue, R.drawable.baseline_report_problem_24));
|
|
|
|
|
items.add(new DrawerItem(-8, R.drawable.baseline_report_problem_24, R.string.menu_issue));
|
|
|
|
|
|
|
|
|
|
if (Helper.getIntentPrivacy().resolveActivity(getPackageManager()) != null)
|
|
|
|
|
items.add(new DrawerItem(-9, R.string.menu_privacy, R.drawable.baseline_account_box_24));
|
|
|
|
|
items.add(new DrawerItem(-9, R.drawable.baseline_account_box_24, R.string.menu_privacy));
|
|
|
|
|
|
|
|
|
|
items.add(new DrawerItem(-10, R.string.menu_about, R.drawable.baseline_info_24));
|
|
|
|
|
items.add(new DrawerItem(-10, R.drawable.baseline_info_24, R.string.menu_about));
|
|
|
|
|
|
|
|
|
|
boolean pro = (getIntentPro() == null || getIntentPro().resolveActivity(getPackageManager()) != null);
|
|
|
|
|
boolean invite = (getIntentInvite().resolveActivity(getPackageManager()) != null);
|
|
|
|
@ -354,16 +366,16 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
|
|
|
|
|
items.add(new DrawerItem(-11));
|
|
|
|
|
|
|
|
|
|
if (pro)
|
|
|
|
|
items.add(new DrawerItem(-12, R.string.menu_pro, R.drawable.baseline_monetization_on_24));
|
|
|
|
|
items.add(new DrawerItem(-12, R.drawable.baseline_monetization_on_24, R.string.menu_pro));
|
|
|
|
|
|
|
|
|
|
if (invite)
|
|
|
|
|
items.add(new DrawerItem(-13, R.string.menu_invite, R.drawable.baseline_people_24));
|
|
|
|
|
items.add(new DrawerItem(-13, R.drawable.baseline_people_24, R.string.menu_invite));
|
|
|
|
|
|
|
|
|
|
if (rate)
|
|
|
|
|
items.add(new DrawerItem(-14, R.string.menu_rate, R.drawable.baseline_star_24));
|
|
|
|
|
items.add(new DrawerItem(-14, R.drawable.baseline_star_24, R.string.menu_rate));
|
|
|
|
|
|
|
|
|
|
if (other)
|
|
|
|
|
items.add(new DrawerItem(-15, R.string.menu_other, R.drawable.baseline_get_app_24));
|
|
|
|
|
items.add(new DrawerItem(-15, R.drawable.baseline_get_app_24, R.string.menu_other));
|
|
|
|
|
|
|
|
|
|
drawerArray.set(items);
|
|
|
|
|
}
|
|
|
|
|