mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-13 05:52:48 +01:00
Categorize library settings
This commit is contained in:
parent
6f84815801
commit
4f03ee814a
@ -27,6 +27,9 @@ class SettingsLibraryController : SettingsController() {
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
|
||||
titleRes = R.string.pref_category_library
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_library_display
|
||||
|
||||
preference {
|
||||
titleRes = R.string.pref_library_columns
|
||||
onClick {
|
||||
@ -51,6 +54,14 @@ class SettingsLibraryController : SettingsController() {
|
||||
"${context.getString(R.string.landscape)}: $landscape"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val dbCategories = db.getCategories().executeAsBlocking()
|
||||
val categories = listOf(Category.createDefault()) + dbCategories
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_library_update
|
||||
|
||||
intListPreference {
|
||||
key = Keys.libraryUpdateInterval
|
||||
titleRes = R.string.pref_library_update_interval
|
||||
@ -93,10 +104,6 @@ class SettingsLibraryController : SettingsController() {
|
||||
titleRes = R.string.pref_update_only_non_completed
|
||||
defaultValue = false
|
||||
}
|
||||
|
||||
val dbCategories = db.getCategories().executeAsBlocking()
|
||||
val categories = listOf(Category.createDefault()) + dbCategories
|
||||
|
||||
multiSelectListPreference {
|
||||
key = Keys.libraryUpdateCategories
|
||||
titleRes = R.string.pref_library_update_categories
|
||||
@ -139,6 +146,11 @@ class SettingsLibraryController : SettingsController() {
|
||||
true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_library_categories
|
||||
|
||||
intListPreference {
|
||||
key = Keys.defaultCategory
|
||||
titleRes = R.string.default_category
|
||||
@ -158,6 +170,7 @@ class SettingsLibraryController : SettingsController() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class LibraryColumnsDialog : DialogController() {
|
||||
|
||||
|
@ -126,12 +126,16 @@
|
||||
<string name="pref_start_screen">Start screen</string>
|
||||
<string name="pref_language">Language</string>
|
||||
<string name="system_default">System default</string>
|
||||
<string name="pref_date_format">Date format</string>
|
||||
|
||||
<!-- Library section -->
|
||||
<string name="pref_category_library_display">Display</string>
|
||||
<string name="pref_library_columns">Library manga per row</string>
|
||||
<string name="portrait">Portrait</string>
|
||||
<string name="landscape">Landscape</string>
|
||||
<string name="default_columns">Default</string>
|
||||
|
||||
<string name="pref_category_library_update">Updates</string>
|
||||
<string name="pref_library_update_interval">Library update frequency</string>
|
||||
<string name="update_never">Manual</string>
|
||||
<string name="update_1hour">Hourly</string>
|
||||
@ -143,19 +147,18 @@
|
||||
<string name="update_48hour">Every 2 days</string>
|
||||
<string name="update_weekly">Weekly</string>
|
||||
<string name="update_monthly">Monthly</string>
|
||||
<string name="pref_library_update_categories">Categories to include in global update</string>
|
||||
<string name="all">All</string>
|
||||
<string name="pref_library_update_prioritization">Library update order</string>
|
||||
<string name="pref_library_update_restriction">Library update restrictions</string>
|
||||
<string name="pref_library_update_restriction_summary">Update only when the conditions are met</string>
|
||||
<string name="wifi">Wi-Fi</string>
|
||||
<string name="charging">Charging</string>
|
||||
<string name="pref_update_only_non_completed">Only update ongoing manga</string>
|
||||
<string name="pref_auto_update_manga_sync">Sync chapters after reading</string>
|
||||
<string name="pref_ask_update_manga_sync">Confirm before updating</string>
|
||||
<string name="pref_date_format">Date format</string>
|
||||
|
||||
<string name="pref_category_library_categories">Categories</string>
|
||||
<string name="default_category">Default category</string>
|
||||
<string name="default_category_summary">Always ask</string>
|
||||
<string name="pref_library_update_categories">Categories to include in global update</string>
|
||||
<string name="all">All</string>
|
||||
|
||||
<!-- Extension section -->
|
||||
<string name="all_lang">All</string>
|
||||
@ -239,7 +242,6 @@
|
||||
<string name="color_filter_b_value">B</string>
|
||||
<string name="color_filter_a_value">A</string>
|
||||
|
||||
|
||||
<!-- Downloads section -->
|
||||
<string name="pref_download_directory">Downloads directory</string>
|
||||
<string name="pref_download_only_over_wifi">Only download over Wi-Fi</string>
|
||||
@ -256,6 +258,7 @@
|
||||
<string name="pref_download_new_categories">Categories to include in download</string>
|
||||
|
||||
<!-- Sync section -->
|
||||
<string name="pref_auto_update_manga_sync">Sync chapters after reading</string>
|
||||
<string name="services">Services</string>
|
||||
|
||||
<!-- Backup section -->
|
||||
|
Loading…
Reference in New Issue
Block a user