Moved bottom navigation setting to bottom of the general list

In case you can't tell this is going to go away someday
This commit is contained in:
Jay 2020-02-08 21:01:13 -08:00
parent 1bb2edc4bb
commit dc103acea2

View File

@ -61,29 +61,6 @@ class SettingsGeneralController : SettingsController() {
}
}
switchPreference {
key = Keys.useBottomNav
titleRes = R.string.use_bottom_nav
defaultValue = true
onChange { bottomNav ->
bottomNav as Boolean
if (!bottomNav) {
MaterialDialog(activity!!).title(R.string.switch_to_sidebar)
.message(R.string.switch_to_sidebar_summary)
.positiveButton(R.string.action_switch) {
preferences.useBottonNav().set(bottomNav)
switchNavType(bottomNav)
}.negativeButton(android.R.string.no).show()
false
}
else {
switchNavType(bottomNav)
true
}
}
}
listPreference(activity) {
key= Keys.dateFormat
titleRes = R.string.pref_date_format
@ -158,6 +135,29 @@ class SettingsGeneralController : SettingsController() {
defaultValue = 0
}
}
switchPreference {
key = Keys.useBottomNav
titleRes = R.string.use_bottom_nav
defaultValue = true
onChange { bottomNav ->
bottomNav as Boolean
if (!bottomNav) {
MaterialDialog(activity!!).title(R.string.switch_to_sidebar)
.message(R.string.switch_to_sidebar_summary)
.positiveButton(R.string.action_switch) {
preferences.useBottonNav().set(bottomNav)
switchNavType(bottomNav)
}.negativeButton(android.R.string.no).show()
false
}
else {
switchNavType(bottomNav)
true
}
}
}
}
fun switchNavType(bottomNav: Boolean) {