mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 19:31:49 +01:00
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:
parent
1bb2edc4bb
commit
dc103acea2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user