mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 03:07:25 +01:00
Cleanup hide updates/history button settings
This commit is contained in:
parent
7fb4cbb8a0
commit
8e7c235ff0
@ -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"
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -487,10 +487,8 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
||||
}
|
||||
|
||||
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()
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -167,8 +167,6 @@
|
||||
<string name="pref_date_format">Date format</string>
|
||||
<string name="pref_confirm_exit">Confirm exit</string>
|
||||
<string name="pref_hide_bottom_bar_on_scroll">Hide bottom bar on scroll</string>
|
||||
<string name="pref_hide_updates_button">Hide Updates button</string>
|
||||
<string name="pref_hide_history_button">Hide History button</string>
|
||||
<string name="pref_manage_notifications">Manage notifications</string>
|
||||
|
||||
<string name="pref_category_security">Security</string>
|
||||
|
Loading…
Reference in New Issue
Block a user