Format Category String on Subtitle Display (mihonapp/mihon#1030)
* Fixes mihonapp/mihon#1029 * Max Line Length Fix * Update SettingsLibraryScreen.kt No idea how this works. Co-authored-by: Foolbar <118464521+Foolbar@users.noreply.github.com> --------- Co-authored-by: Foolbar <118464521+Foolbar@users.noreply.github.com> (cherry picked from commit 88efde8796b0e1cc8fba6cd987bdc487bd97f248)
This commit is contained in:
parent
3e5d62894e
commit
ee92333aea
1 changed files with 0 additions and 4 deletions
|
|
@ -85,9 +85,6 @@ object SettingsLibraryScreen : SearchableSettings {
|
|||
val scope = rememberCoroutineScope()
|
||||
val userCategoriesCount = allCategories.filterNot(Category::isSystemCategory).size
|
||||
|
||||
val defaultCategory by libraryPreferences.defaultCategory().collectAsState()
|
||||
val selectedCategory = allCategories.find { it.id == defaultCategory.toLong() }
|
||||
|
||||
// For default category
|
||||
val ids = listOf(libraryPreferences.defaultCategory().defaultValue()) +
|
||||
allCategories.fastMap { it.id.toInt() }
|
||||
|
|
@ -109,7 +106,6 @@ object SettingsLibraryScreen : SearchableSettings {
|
|||
Preference.PreferenceItem.ListPreference(
|
||||
pref = libraryPreferences.defaultCategory(),
|
||||
title = stringResource(MR.strings.default_category),
|
||||
subtitle = selectedCategory?.visualName ?: stringResource(MR.strings.default_category_summary),
|
||||
entries = ids.zip(labels).toMap().toImmutableMap(),
|
||||
),
|
||||
Preference.PreferenceItem.SwitchPreference(
|
||||
|
|
|
|||
Loading…
Reference in a new issue