1
0
Fork 0
mirror of https://github.com/gsantner/dandelion synced 2025-09-10 10:49:42 +02:00

Merge extended notifications menu into main menu

This commit is contained in:
Gregor Santner 2017-10-29 11:07:52 +01:00
parent cb811d8236
commit aaa2445bef
No known key found for this signature in database
GPG key ID: 7E83A7834AECB009
3 changed files with 50 additions and 60 deletions

View file

@ -679,6 +679,8 @@ public class MainActivity extends ThemedActivity
@Override
public boolean onCreateOptionsMenu(Menu menu) {
AppLog.v(this, "onCreateOptionsMenu()");
boolean cache;
//Clear the menus
menu.clear();
toolbarBottom.getMenu().clear();
@ -691,10 +693,10 @@ public class MainActivity extends ThemedActivity
///Hide bottom _toolbar
toolbarBottom.setVisibility(View.GONE);
} else {
getMenuInflater().inflate(_appSettings.isExtendedNotificationsActivated() ?
R.menu.main__menu_top__notifications_dropdown : R.menu.main__menu_top, menu);
getMenuInflater().inflate(R.menu.main__menu_bottom, toolbarBottom.getMenu());
top.onCreateBottomOptionsMenu(toolbarBottom.getMenu(), getMenuInflater());
cache = _appSettings.isExtendedNotificationsActivated();
getMenuInflater().inflate(R.menu.main__menu_top, menu);
menu.findItem(R.id.action_notifications).setVisible(!cache);
menu.findItem(R.id.action_notifications_extended).setVisible(cache);
}
}
return true;