mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Fix kotlin-inject assisted warning
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ package ca.gosyer.jui.ui.sources.browse
|
||||
import ca.gosyer.jui.domain.library.model.DisplayMode
|
||||
import ca.gosyer.jui.domain.library.service.LibraryPreferences
|
||||
import ca.gosyer.jui.domain.source.interactor.GetLatestManga
|
||||
import ca.gosyer.jui.domain.source.interactor.GetMangaPage
|
||||
import ca.gosyer.jui.domain.source.interactor.GetPopularManga
|
||||
import ca.gosyer.jui.domain.source.interactor.GetSearchManga
|
||||
import ca.gosyer.jui.domain.source.interactor.SourcePager
|
||||
@@ -38,7 +39,7 @@ class SourceScreenViewModel(
|
||||
private val getSearchManga: GetSearchManga,
|
||||
private val catalogPreferences: CatalogPreferences,
|
||||
private val libraryPreferences: LibraryPreferences,
|
||||
private val getSourcePager: (suspend (page: Int) -> MangaPage?) -> SourcePager,
|
||||
private val getSourcePager: (GetMangaPage) -> SourcePager,
|
||||
contextWrapper: ContextWrapper,
|
||||
private val savedStateHandle: SavedStateHandle,
|
||||
initialQuery: String?
|
||||
@@ -50,7 +51,7 @@ class SourceScreenViewModel(
|
||||
getSearchManga: GetSearchManga,
|
||||
catalogPreferences: CatalogPreferences,
|
||||
libraryPreferences: LibraryPreferences,
|
||||
getSourcePager: (suspend (page: Int) -> MangaPage?) -> SourcePager,
|
||||
getSourcePager: (GetMangaPage) -> SourcePager,
|
||||
contextWrapper: ContextWrapper,
|
||||
@Assisted savedStateHandle: SavedStateHandle,
|
||||
@Assisted params: Params
|
||||
|
||||
Reference in New Issue
Block a user