mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17: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 hideBottomBar = "pref_hide_bottom_bar_on_scroll"
|
||||||
|
|
||||||
const val hideUpdatesButton = "pref_hide_updates_button"
|
const val showNavUpdates = "pref_nav_show_updates"
|
||||||
|
const val showNavHistory = "pref_nav_show_history"
|
||||||
const val hideHistoryButton = "pref_hide_history_button"
|
|
||||||
|
|
||||||
const val enableTransitions = "pref_enable_transitions_key"
|
const val enableTransitions = "pref_enable_transitions_key"
|
||||||
|
|
||||||
|
@ -65,9 +65,8 @@ class PreferencesHelper(val context: Context) {
|
|||||||
|
|
||||||
fun hideBottomBar() = flowPrefs.getBoolean(Keys.hideBottomBar, true)
|
fun hideBottomBar() = flowPrefs.getBoolean(Keys.hideBottomBar, true)
|
||||||
|
|
||||||
fun hideUpdatesButton() = flowPrefs.getBoolean(Keys.hideUpdatesButton, true)
|
fun showNavUpdates() = prefs.getBoolean(Keys.showNavUpdates, true)
|
||||||
|
fun showNavHistory() = prefs.getBoolean(Keys.showNavHistory, true)
|
||||||
fun hideHistoryButton() = flowPrefs.getBoolean(Keys.hideHistoryButton, true)
|
|
||||||
|
|
||||||
fun useBiometricLock() = flowPrefs.getBoolean(Keys.useBiometricLock, false)
|
fun useBiometricLock() = flowPrefs.getBoolean(Keys.useBiometricLock, false)
|
||||||
|
|
||||||
|
@ -487,10 +487,8 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun updateNavMenu(menu: Menu) {
|
private fun updateNavMenu(menu: Menu) {
|
||||||
val navUpdates = menu.findItem(R.id.nav_updates)
|
menu.findItem(R.id.nav_updates).isVisible = preferences.showNavUpdates()
|
||||||
navUpdates.isVisible = !preferences.hideUpdatesButton().get()
|
menu.findItem(R.id.nav_history).isVisible = preferences.showNavHistory()
|
||||||
val navHistory = menu.findItem(R.id.nav_history)
|
|
||||||
navHistory.isVisible = !preferences.hideHistoryButton().get()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -271,14 +271,14 @@ class SettingsGeneralController : SettingsController() {
|
|||||||
defaultValue = true
|
defaultValue = true
|
||||||
}
|
}
|
||||||
switchPreference {
|
switchPreference {
|
||||||
key = Keys.hideUpdatesButton
|
key = Keys.showNavUpdates
|
||||||
titleRes = R.string.pref_hide_updates_button
|
titleRes = R.string.label_recent_updates
|
||||||
defaultValue = false
|
defaultValue = true
|
||||||
}
|
}
|
||||||
switchPreference {
|
switchPreference {
|
||||||
key = Keys.hideHistoryButton
|
key = Keys.showNavHistory
|
||||||
titleRes = R.string.pref_hide_history_button
|
titleRes = R.string.label_recent_manga
|
||||||
defaultValue = false
|
defaultValue = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,8 +167,6 @@
|
|||||||
<string name="pref_date_format">Date format</string>
|
<string name="pref_date_format">Date format</string>
|
||||||
<string name="pref_confirm_exit">Confirm exit</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_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_manage_notifications">Manage notifications</string>
|
||||||
|
|
||||||
<string name="pref_category_security">Security</string>
|
<string name="pref_category_security">Security</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user