Cleanup hide updates/history button settings

This commit is contained in:
arkon
2021-05-15 15:03:09 -04:00
parent 7fb4cbb8a0
commit 8e7c235ff0
5 changed files with 12 additions and 18 deletions

View File

@@ -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()
}
/**

View File

@@ -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
}
}
}