소스 검색

Distinguish between no results and loading when sorting global search results

arkon 4 년 전
부모
커밋
2be9871d05
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchPresenter.kt

+ 2 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchPresenter.kt

@@ -185,7 +185,8 @@ open class GlobalSearchPresenter(
                     .sortedWith(
                         compareBy(
                             // Bubble up sources that actually have results
-                            { it.results.isNullOrEmpty() },
+                            { it.results?.isEmpty() },
+                            { it.results == null },
                             // Same as initial sort, i.e. pinned first then alphabetically
                             { it.source.id.toString() !in pinnedSourceIds },
                             { "${it.source.name.toLowerCase()} (${it.source.lang})" }