mirror of
https://github.com/mihonapp/mihon.git
synced 2026-10-16 13:48:09 -07:00
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.model.Manga
|
||||
import tachiyomi.domain.source.service.SourceManager
|
||||
import tachiyomi.source.local.isLocal
|
||||
|
||||
abstract class SearchViewModel(
|
||||
initialState: State = State(),
|
||||
@@ -88,7 +89,7 @@ abstract class SearchViewModel(
|
||||
|
||||
open suspend fun getEnabledSources(): List<Source> {
|
||||
return sourceManager.getAll()
|
||||
.filter { it.lang in enabledLanguages && "${it.id}" !in disabledSources }
|
||||
.filter { (it.lang in enabledLanguages || it.isLocal()) && "${it.id}" !in disabledSources }
|
||||
.sortedWith(
|
||||
compareBy(
|
||||
{ "${it.id}" !in pinnedSources },
|
||||
|
||||
Reference in New Issue
Block a user