Small improvement

pull/147/head
M66B 6 years ago
parent 71e83e2c7f
commit b3aaaf0919

@ -170,10 +170,10 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
PackageManager pm = getPackageManager();
DrawerAdapter drawerArray = new DrawerAdapter(this);
if (getIntentHelp().resolveActivity(pm) != null)
if (getIntentHelp().resolveActivity(pm) != null) {
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_live_help_24, R.string.title_setup_help));
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
}
if (getIntentExport().resolveActivity(pm) != null)
drawerArray.add(new DrawerItem(this, R.layout.item_drawer, R.drawable.baseline_archive_24, R.string.title_setup_export));

@ -316,15 +316,20 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_info_24, R.string.menu_about));
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
boolean invite = (getIntentInvite().resolveActivity(getPackageManager()) != null);
boolean rate = (getIntentRate().resolveActivity(getPackageManager()) != null);
boolean other = (getIntentOtherApps().resolveActivity(getPackageManager()) != null);
if (invite || rate || other)
drawerArray.add(new DrawerItem(R.layout.item_drawer_separator));
if (getIntentInvite().resolveActivity(getPackageManager()) != null)
if (invite)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_people_24, R.string.menu_invite));
if (getIntentRate().resolveActivity(getPackageManager()) != null)
if (rate)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_star_24, R.string.menu_rate));
if (getIntentOtherApps().resolveActivity(getPackageManager()) != null)
if (other)
drawerArray.add(new DrawerItem(ActivityView.this, R.layout.item_drawer, R.drawable.baseline_get_app_24, R.string.menu_other));
drawerList.setAdapter(drawerArray);

Loading…
Cancel
Save