Hide hidden sources from sources filter
This commit is contained in:
parent
cdebb6db67
commit
7b470640b6
@ -4,6 +4,7 @@ import eu.kanade.domain.source.model.Source
|
|||||||
import eu.kanade.domain.source.repository.SourceRepository
|
import eu.kanade.domain.source.repository.SourceRepository
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||||
|
import exh.source.BlacklistedSources
|
||||||
import kotlinx.coroutines.flow.Flow
|
import kotlinx.coroutines.flow.Flow
|
||||||
import kotlinx.coroutines.flow.combine
|
import kotlinx.coroutines.flow.combine
|
||||||
|
|
||||||
@ -18,7 +19,7 @@ class GetLanguagesWithSources(
|
|||||||
preferences.disabledSources().asFlow(),
|
preferences.disabledSources().asFlow(),
|
||||||
repository.getOnlineSources()
|
repository.getOnlineSources()
|
||||||
) { enabledLanguage, disabledSource, onlineSources ->
|
) { enabledLanguage, disabledSource, onlineSources ->
|
||||||
val sortedSources = onlineSources.sortedWith(
|
val sortedSources = onlineSources.filterNot { it.id in BlacklistedSources.HIDDEN_SOURCES }.sortedWith(
|
||||||
compareBy<Source> { it.id.toString() in disabledSource }
|
compareBy<Source> { it.id.toString() in disabledSource }
|
||||||
.thenBy(String.CASE_INSENSITIVE_ORDER) { it.name }
|
.thenBy(String.CASE_INSENSITIVE_ORDER) { it.name }
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user