瀏覽代碼

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.

(cherry picked from commit dc2eaf07882ce1e7acaea9de7eb26de331ef6c77)
Two-Ai 2 年之前
父節點
當前提交
d9969cea8a

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/MigrateSearchScreenModel.kt

@@ -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?) {