From b809f57950669936a74be7637b632ac93bee7125 Mon Sep 17 00:00:00 2001 From: Jay Date: Sun, 10 May 2020 14:37:22 -0400 Subject: [PATCH] Pinned sources now listed first in global search --- .../tachiyomi/ui/source/global_search/SourceSearchPresenter.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchPresenter.kt index 8077e1d87d..5b720b580b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/source/global_search/SourceSearchPresenter.kt @@ -102,11 +102,13 @@ open class SourceSearchPresenter( protected open fun getEnabledSources(): List { val languages = preferencesHelper.enabledLanguages().getOrDefault() val hiddenCatalogues = preferencesHelper.hiddenSources().getOrDefault() + val pinnedCatalogues = preferencesHelper.pinnedCatalogues().getOrDefault() return sourceManager.getCatalogueSources() .filter { it.lang in languages } .filterNot { it.id.toString() in hiddenCatalogues } .sortedBy { "(${it.lang}) ${it.name}" } + .sortedBy { it.id.toString() !in pinnedCatalogues } } private fun getSourcesToQuery(): List {