mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 16:01:48 +01:00
Pinned sources now listed first in global search
This commit is contained in:
parent
1cca914c8f
commit
b809f57950
@ -102,11 +102,13 @@ open class SourceSearchPresenter(
|
||||
protected open fun getEnabledSources(): List<CatalogueSource> {
|
||||
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<CatalogueSource> {
|
||||
|
Loading…
Reference in New Issue
Block a user