diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt index 6fad83404..0bc039ea6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt @@ -15,9 +15,8 @@ object PreferenceKeys { const val hideBottomBar = "pref_hide_bottom_bar_on_scroll" - const val hideUpdatesButton = "pref_hide_updates_button" - - const val hideHistoryButton = "pref_hide_history_button" + const val showNavUpdates = "pref_nav_show_updates" + const val showNavHistory = "pref_nav_show_history" const val enableTransitions = "pref_enable_transitions_key" diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index db157250c..a68c1ceac 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -65,9 +65,8 @@ class PreferencesHelper(val context: Context) { fun hideBottomBar() = flowPrefs.getBoolean(Keys.hideBottomBar, true) - fun hideUpdatesButton() = flowPrefs.getBoolean(Keys.hideUpdatesButton, true) - - fun hideHistoryButton() = flowPrefs.getBoolean(Keys.hideHistoryButton, true) + fun showNavUpdates() = prefs.getBoolean(Keys.showNavUpdates, true) + fun showNavHistory() = prefs.getBoolean(Keys.showNavHistory, true) fun useBiometricLock() = flowPrefs.getBoolean(Keys.useBiometricLock, false) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index 5c3be4bf5..cfc19ffb3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -487,10 +487,8 @@ class MainActivity : BaseViewBindingActivity() { } private fun updateNavMenu(menu: Menu) { - val navUpdates = menu.findItem(R.id.nav_updates) - navUpdates.isVisible = !preferences.hideUpdatesButton().get() - val navHistory = menu.findItem(R.id.nav_history) - navHistory.isVisible = !preferences.hideHistoryButton().get() + menu.findItem(R.id.nav_updates).isVisible = preferences.showNavUpdates() + menu.findItem(R.id.nav_history).isVisible = preferences.showNavHistory() } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt index e814f5cac..1b34784cf 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt @@ -271,14 +271,14 @@ class SettingsGeneralController : SettingsController() { defaultValue = true } switchPreference { - key = Keys.hideUpdatesButton - titleRes = R.string.pref_hide_updates_button - defaultValue = false + key = Keys.showNavUpdates + titleRes = R.string.label_recent_updates + defaultValue = true } switchPreference { - key = Keys.hideHistoryButton - titleRes = R.string.pref_hide_history_button - defaultValue = false + key = Keys.showNavHistory + titleRes = R.string.label_recent_manga + defaultValue = true } } } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ee8f0f1cb..f08077b8f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -167,8 +167,6 @@ Date format Confirm exit Hide bottom bar on scroll - Hide Updates button - Hide History button Manage notifications Security