From 7294220727333516b4956e35f50e27e5c12fe278 Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Sun, 8 Apr 2018 16:26:37 -0300 Subject: [PATCH] Revert removal of menu items --- .../java/org/schabi/newpipe/MainActivity.java | 10 ++++--- app/src/main/res/menu/main_menu.xml | 27 ++++++++++++++++--- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 1fdb67cf3..dd067b9b6 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -97,10 +97,9 @@ public class MainActivity extends AppCompatActivity { drawerItems = findViewById(R.id.navigation); for(StreamingService s : NewPipe.getServices()) { - String title = - s.getServiceInfo().getName() + - (ServiceHelper.isBeta(s) ? " (beta)" : ""); - MenuItem item = drawerItems.getMenu() + final String title = s.getServiceInfo().getName() + + (ServiceHelper.isBeta(s) ? " (beta)" : ""); + final MenuItem item = drawerItems.getMenu() .add(R.id.menu_services_group, s.getServiceId(), 0, title); item.setIcon(ServiceHelper.getIcon(s.getServiceId())); } @@ -336,6 +335,9 @@ public class MainActivity extends AppCompatActivity { case R.id.action_about: NavigationHelper.openAbout(this); return true; + case R.id.action_history: + NavigationHelper.openHistory(this); + return true; default: return super.onOptionsItemSelected(item); } diff --git a/app/src/main/res/menu/main_menu.xml b/app/src/main/res/menu/main_menu.xml index df22b47c0..b6372433e 100644 --- a/app/src/main/res/menu/main_menu.xml +++ b/app/src/main/res/menu/main_menu.xml @@ -1,8 +1,27 @@ - + - + + + + + + \ No newline at end of file