mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 22:01:51 +01:00
Show default message when no categories selected
This commit is contained in:
parent
3ce880bc62
commit
8512f97386
@ -84,10 +84,16 @@ class SettingsGeneralFragment : SettingsFragment(),
|
||||
|
||||
subscriptions += preferences.libraryUpdateCategories().asObservable()
|
||||
.subscribe {
|
||||
categoryUpdate.summary = it
|
||||
val selectedCategories = it
|
||||
.mapNotNull { id -> dbCategories.find { it.id == id.toInt() } }
|
||||
.sortedBy { it.order }
|
||||
.joinToString { it.name }
|
||||
|
||||
val summary = if (selectedCategories.isEmpty())
|
||||
getString(R.string.all)
|
||||
else
|
||||
selectedCategories.joinToString { it.name }
|
||||
|
||||
categoryUpdate.summary = summary
|
||||
}
|
||||
|
||||
themePreference.setOnPreferenceChangeListener { preference, newValue ->
|
||||
|
@ -86,6 +86,7 @@
|
||||
<string name="update_24hour">Daily</string>
|
||||
<string name="update_48hour">Every 2 days</string>
|
||||
<string name="pref_library_update_categories">Categories to include in global update</string>
|
||||
<string name="all">All</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>
|
||||
|
Loading…
Reference in New Issue
Block a user