diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java
index 90d299c7f..cce02f526 100644
--- a/app/src/main/java/org/schabi/newpipe/MainActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java
@@ -449,6 +449,16 @@ public class MainActivity extends AppCompatActivity {
sharedPreferences.edit().putBoolean(Constants.KEY_MAIN_PAGE_CHANGE, false).apply();
NavigationHelper.openMainActivity(this);
}
+
+ if (sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) {
+ if (DEBUG) Log.d(TAG, "do not show History-menu as its disabled in settings");
+ drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(true);
+ }
+
+ if (!sharedPreferences.getBoolean(Constants.KEY_ENABLE_WATCH_HISTORY, true)) {
+ if (DEBUG) Log.d(TAG, "show History-menu as its enabled in settings");
+ drawerItems.getMenu().findItem(ITEM_ID_HISTORY).setVisible(false);
+ }
}
@Override
@@ -551,8 +561,6 @@ public class MainActivity extends AppCompatActivity {
if (!(fragment instanceof SearchFragment)) {
findViewById(R.id.toolbar).findViewById(R.id.toolbar_search_container).setVisibility(View.GONE);
- MenuInflater inflater = getMenuInflater();
- inflater.inflate(R.menu.main_menu, menu);
}
ActionBar actionBar = getSupportActionBar();
@@ -574,14 +582,6 @@ public class MainActivity extends AppCompatActivity {
case android.R.id.home:
onHomeButtonPressed();
return true;
- case R.id.action_show_downloads:
- return NavigationHelper.openDownloads(this);
- case R.id.action_history:
- NavigationHelper.openStatisticFragment(getSupportFragmentManager());
- return true;
- case R.id.action_settings:
- NavigationHelper.openSettings(this);
- return true;
default:
return super.onOptionsItemSelected(item);
}
diff --git a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java
index 2326e795e..e028c0322 100644
--- a/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/about/AboutActivity.java
@@ -99,11 +99,6 @@ public class AboutActivity extends AppCompatActivity {
case android.R.id.home:
finish();
return true;
- case R.id.action_settings:
- NavigationHelper.openSettings(this);
- return true;
- case R.id.action_show_downloads:
- return NavigationHelper.openDownloads(this);
}
return super.onOptionsItemSelected(item);
diff --git a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java
index 449a790e8..26e5d94be 100644
--- a/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/download/DownloadActivity.java
@@ -78,11 +78,7 @@ public class DownloadActivity extends AppCompatActivity {
onBackPressed();
return true;
}
- case R.id.action_settings: {
- Intent intent = new Intent(this, SettingsActivity.class);
- startActivity(intent);
- return true;
- }
+
default:
return super.onOptionsItemSelected(item);
}
diff --git a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
index 2207808ac..7b9120783 100644
--- a/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
+++ b/app/src/main/java/org/schabi/newpipe/player/ServicePlayerActivity.java
@@ -157,10 +157,6 @@ public abstract class ServicePlayerActivity extends AppCompatActivity
case R.id.action_append_playlist:
appendAllToPlaylist();
return true;
- case R.id.action_settings:
- NavigationHelper.openSettings(this);
- redraw = true;
- return true;
case R.id.action_system_audio:
startActivity(new Intent(Settings.ACTION_SOUND_SETTINGS));
return true;
diff --git a/app/src/main/java/org/schabi/newpipe/util/Constants.java b/app/src/main/java/org/schabi/newpipe/util/Constants.java
index b01b6df6a..50350651d 100644
--- a/app/src/main/java/org/schabi/newpipe/util/Constants.java
+++ b/app/src/main/java/org/schabi/newpipe/util/Constants.java
@@ -11,5 +11,7 @@ public class Constants {
public static final String KEY_THEME_CHANGE = "key_theme_change";
public static final String KEY_MAIN_PAGE_CHANGE = "key_main_page_change";
+ public static final String KEY_ENABLE_WATCH_HISTORY = "enable_watch_history";
+
public static final int NO_SERVICE_ID = -1;
}
diff --git a/app/src/main/res/menu/download_menu.xml b/app/src/main/res/menu/download_menu.xml
index 8728e146e..27d9bfe29 100644
--- a/app/src/main/res/menu/download_menu.xml
+++ b/app/src/main/res/menu/download_menu.xml
@@ -27,8 +27,4 @@
android:title="@string/clear_download_history"
app:showAsAction="ifRoom" />
-