mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-11 11:39:10 +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> {
|
protected open fun getEnabledSources(): List<CatalogueSource> {
|
||||||
val languages = preferencesHelper.enabledLanguages().getOrDefault()
|
val languages = preferencesHelper.enabledLanguages().getOrDefault()
|
||||||
val hiddenCatalogues = preferencesHelper.hiddenSources().getOrDefault()
|
val hiddenCatalogues = preferencesHelper.hiddenSources().getOrDefault()
|
||||||
|
val pinnedCatalogues = preferencesHelper.pinnedCatalogues().getOrDefault()
|
||||||
|
|
||||||
return sourceManager.getCatalogueSources()
|
return sourceManager.getCatalogueSources()
|
||||||
.filter { it.lang in languages }
|
.filter { it.lang in languages }
|
||||||
.filterNot { it.id.toString() in hiddenCatalogues }
|
.filterNot { it.id.toString() in hiddenCatalogues }
|
||||||
.sortedBy { "(${it.lang}) ${it.name}" }
|
.sortedBy { "(${it.lang}) ${it.name}" }
|
||||||
|
.sortedBy { it.id.toString() !in pinnedCatalogues }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getSourcesToQuery(): List<CatalogueSource> {
|
private fun getSourcesToQuery(): List<CatalogueSource> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user