Fix kotlin-inject assisted warning

This commit is contained in:
Syer10
2023-02-13 16:29:11 -05:00
parent 2ef8be097e
commit 3b39b4e4bc
2 changed files with 7 additions and 3 deletions

View File

@@ -25,13 +25,16 @@ import kotlinx.coroutines.flow.runningFold
import kotlinx.coroutines.flow.stateIn
import kotlinx.coroutines.launch
import kotlinx.coroutines.sync.Mutex
import me.tatarka.inject.annotations.Assisted
import me.tatarka.inject.annotations.Inject
import org.lighthousegames.logging.logging
typealias GetMangaPage = @param:Assisted suspend (page: Int) -> MangaPage?
class SourcePager @Inject constructor(
private val getManga: GetManga,
private val serverListeners: ServerListeners,
private val fetcher: suspend (page: Int) -> MangaPage?
private val fetcher: GetMangaPage
) : CoroutineScope by CoroutineScope(Dispatchers.Default + SupervisorJob()) {
private val sourceMutex = Mutex()