Fix ID type mismatch in MigrateSearchScreenModel (#9090)

`it.id` is the source ID of the source being sorted.
`state.value.manga!!.id` is the manga ID of the selected manga.
`state.value.manga!!.source` is the source ID of the selected manga.
pull/9103/head
Two-Ai 2 years ago committed by GitHub
parent d02b0ca2db
commit dc2eaf0788
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -49,7 +49,7 @@ class MigrateSearchScreenModel(
.filter { it.lang in enabledLanguages }
.filterNot { "${it.id}" in disabledSources }
.sortedWith(compareBy({ "${it.id}" !in pinnedSources }, { "${it.name.lowercase()} (${it.lang})" }))
.sortedByDescending { it.id == state.value.manga!!.id }
.sortedByDescending { it.id == state.value.manga!!.source }
}
override fun updateSearchQuery(query: String?) {

Loading…
Cancel
Save