mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 13:37:29 +01:00
Remove library update order setting
This doesn't make sense to have if the intention is to have reasonably sized global updates. Opting to remove it to remove complexity instead.
This commit is contained in:
@@ -270,34 +270,6 @@ class SettingsLibraryController : SettingsController() {
|
||||
.onEach { updateSummary() }
|
||||
.launchIn(viewScope)
|
||||
}
|
||||
intListPreference {
|
||||
key = Keys.libraryUpdatePrioritization
|
||||
titleRes = R.string.pref_library_update_prioritization
|
||||
|
||||
visibleIfGlobalUpdateEnabled()
|
||||
|
||||
// The following array lines up with the list rankingScheme in:
|
||||
// ../../data/library/LibraryUpdateRanker.kt
|
||||
val priorities = arrayOf(
|
||||
Pair("0", R.string.action_sort_alpha),
|
||||
Pair("1", R.string.action_sort_last_checked),
|
||||
Pair("2", R.string.action_sort_next_updated)
|
||||
)
|
||||
val defaultPriority = priorities[0]
|
||||
|
||||
entriesRes = priorities.map { it.second }.toTypedArray()
|
||||
entryValues = priorities.map { it.first }.toTypedArray()
|
||||
defaultValue = defaultPriority.first
|
||||
|
||||
val selectedPriority = priorities.find { it.first.toInt() == preferences.libraryUpdatePrioritization().get() }
|
||||
summaryRes = selectedPriority?.second ?: defaultPriority.second
|
||||
onChange { newValue ->
|
||||
summaryRes = priorities.find {
|
||||
it.first == (newValue as String)
|
||||
}?.second ?: defaultPriority.second
|
||||
true
|
||||
}
|
||||
}
|
||||
switchPreference {
|
||||
key = Keys.autoUpdateMetadata
|
||||
titleRes = R.string.pref_library_update_refresh_metadata
|
||||
|
||||
Reference in New Issue
Block a user