Include the local source in global search (#3784)
Closes #3784 Fixes #3783
This commit is contained in:
+2
-1
@@ -27,6 +27,7 @@ import tachiyomi.domain.manga.interactor.GetManga
|
|||||||
import tachiyomi.domain.manga.interactor.NetworkToLocalManga
|
import tachiyomi.domain.manga.interactor.NetworkToLocalManga
|
||||||
import tachiyomi.domain.manga.model.Manga
|
import tachiyomi.domain.manga.model.Manga
|
||||||
import tachiyomi.domain.source.service.SourceManager
|
import tachiyomi.domain.source.service.SourceManager
|
||||||
|
import tachiyomi.source.local.isLocal
|
||||||
|
|
||||||
abstract class SearchViewModel(
|
abstract class SearchViewModel(
|
||||||
initialState: State = State(),
|
initialState: State = State(),
|
||||||
@@ -88,7 +89,7 @@ abstract class SearchViewModel(
|
|||||||
|
|
||||||
open suspend fun getEnabledSources(): List<Source> {
|
open suspend fun getEnabledSources(): List<Source> {
|
||||||
return sourceManager.getAll()
|
return sourceManager.getAll()
|
||||||
.filter { it.lang in enabledLanguages && "${it.id}" !in disabledSources }
|
.filter { (it.lang in enabledLanguages || it.isLocal()) && "${it.id}" !in disabledSources }
|
||||||
.sortedWith(
|
.sortedWith(
|
||||||
compareBy(
|
compareBy(
|
||||||
{ "${it.id}" !in pinnedSources },
|
{ "${it.id}" !in pinnedSources },
|
||||||
|
|||||||
Reference in New Issue
Block a user