mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 19:27:25 +01:00
More settings organization
This commit is contained in:
parent
970f1466b5
commit
6f0e1965b6
@ -6,6 +6,7 @@ import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||
import eu.kanade.tachiyomi.extension.ExtensionUpdateJob
|
||||
import eu.kanade.tachiyomi.util.preference.defaultValue
|
||||
import eu.kanade.tachiyomi.util.preference.onChange
|
||||
import eu.kanade.tachiyomi.util.preference.preferenceCategory
|
||||
import eu.kanade.tachiyomi.util.preference.switchPreference
|
||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||
|
||||
@ -14,21 +15,30 @@ class SettingsBrowseController : SettingsController() {
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.browse
|
||||
|
||||
switchPreference {
|
||||
key = Keys.automaticExtUpdates
|
||||
titleRes = R.string.pref_enable_automatic_extension_updates
|
||||
defaultValue = true
|
||||
preferenceCategory {
|
||||
titleRes = R.string.label_extensions
|
||||
|
||||
onChange { newValue ->
|
||||
val checked = newValue as Boolean
|
||||
ExtensionUpdateJob.setupTask(activity!!, checked)
|
||||
true
|
||||
switchPreference {
|
||||
key = Keys.automaticExtUpdates
|
||||
titleRes = R.string.pref_enable_automatic_extension_updates
|
||||
defaultValue = true
|
||||
|
||||
onChange { newValue ->
|
||||
val checked = newValue as Boolean
|
||||
ExtensionUpdateJob.setupTask(activity!!, checked)
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.searchPinnedSourcesOnly
|
||||
titleRes = R.string.pref_search_pinned_sources_only
|
||||
defaultValue = false
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.action_global_search
|
||||
|
||||
switchPreference {
|
||||
key = Keys.searchPinnedSourcesOnly
|
||||
titleRes = R.string.pref_search_pinned_sources_only
|
||||
defaultValue = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +160,7 @@
|
||||
|
||||
<!-- Library section -->
|
||||
<string name="pref_category_display">Display</string>
|
||||
<string name="pref_library_columns">Library manga per row</string>
|
||||
<string name="pref_library_columns">Items per row</string>
|
||||
<string name="portrait">Portrait</string>
|
||||
<string name="landscape">Landscape</string>
|
||||
<string name="default_columns">Default</string>
|
||||
@ -305,7 +305,7 @@
|
||||
|
||||
<!-- Browse section -->
|
||||
<string name="pref_enable_automatic_extension_updates">Check for extension updates</string>
|
||||
<string name="pref_search_pinned_sources_only">Only include pinned sources in global search</string>
|
||||
<string name="pref_search_pinned_sources_only">Only include pinned sources</string>
|
||||
|
||||
<!-- Backup section -->
|
||||
<string name="backup">Backup</string>
|
||||
|
Loading…
Reference in New Issue
Block a user