Make the source manager surface suspend (#3869)

Assisted-by: Claude:claude-opus-5
This commit is contained in:
AntsyLich
2026-08-28 23:36:28 +06:00
committed by GitHub
parent c1d1f6b161
commit 5fadea61e7
50 changed files with 328 additions and 251 deletions
@@ -3,22 +3,19 @@ package tachiyomi.domain.source.service
import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.online.HttpSource
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.StateFlow
import tachiyomi.domain.source.model.StubSource
interface SourceManager {
val isInitialized: StateFlow<Boolean>
val sources: Flow<List<Source>>
fun get(sourceKey: Long): Source?
suspend fun get(sourceKey: Long): Source?
fun getOrStub(sourceKey: Long): Source
suspend fun getOrStub(sourceKey: Long): Source
fun getAll(): List<Source>
suspend fun getAll(): List<Source>
fun getOnlineSources(): List<HttpSource>
suspend fun getOnlineSources(): List<HttpSource>
fun getStubSources(): List<StubSource>
suspend fun getStubSources(): List<StubSource>
}