|
|
|
@ -18,6 +18,7 @@ import kotlinx.coroutines.flow.onEach
|
|
|
|
import kotlinx.coroutines.flow.stateIn
|
|
|
|
import kotlinx.coroutines.flow.stateIn
|
|
|
|
import kotlinx.coroutines.plus
|
|
|
|
import kotlinx.coroutines.plus
|
|
|
|
import org.koitharu.kotatsu.R
|
|
|
|
import org.koitharu.kotatsu.R
|
|
|
|
|
|
|
|
import org.koitharu.kotatsu.core.model.MangaSource
|
|
|
|
import org.koitharu.kotatsu.core.model.distinctById
|
|
|
|
import org.koitharu.kotatsu.core.model.distinctById
|
|
|
|
import org.koitharu.kotatsu.core.parser.MangaRepository
|
|
|
|
import org.koitharu.kotatsu.core.parser.MangaRepository
|
|
|
|
import org.koitharu.kotatsu.core.parser.RemoteMangaRepository
|
|
|
|
import org.koitharu.kotatsu.core.parser.RemoteMangaRepository
|
|
|
|
@ -25,7 +26,6 @@ import org.koitharu.kotatsu.core.prefs.AppSettings
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.MutableEventFlow
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.MutableEventFlow
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.call
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.call
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.printStackTraceDebug
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.printStackTraceDebug
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.require
|
|
|
|
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.sizeOrZero
|
|
|
|
import org.koitharu.kotatsu.core.util.ext.sizeOrZero
|
|
|
|
import org.koitharu.kotatsu.download.ui.worker.DownloadWorker
|
|
|
|
import org.koitharu.kotatsu.download.ui.worker.DownloadWorker
|
|
|
|
import org.koitharu.kotatsu.explore.data.MangaSourcesRepository
|
|
|
|
import org.koitharu.kotatsu.explore.data.MangaSourcesRepository
|
|
|
|
@ -44,7 +44,6 @@ import org.koitharu.kotatsu.list.ui.model.toUi
|
|
|
|
import org.koitharu.kotatsu.parsers.exception.NotFoundException
|
|
|
|
import org.koitharu.kotatsu.parsers.exception.NotFoundException
|
|
|
|
import org.koitharu.kotatsu.parsers.model.Manga
|
|
|
|
import org.koitharu.kotatsu.parsers.model.Manga
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaListFilter
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaListFilter
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaSource
|
|
|
|
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaTag
|
|
|
|
import org.koitharu.kotatsu.parsers.model.MangaTag
|
|
|
|
import javax.inject.Inject
|
|
|
|
import javax.inject.Inject
|
|
|
|
|
|
|
|
|
|
|
|
@ -62,7 +61,7 @@ open class RemoteListViewModel @Inject constructor(
|
|
|
|
sourcesRepository: MangaSourcesRepository,
|
|
|
|
sourcesRepository: MangaSourcesRepository,
|
|
|
|
) : MangaListViewModel(settings, downloadScheduler), MangaFilter by filter {
|
|
|
|
) : MangaListViewModel(settings, downloadScheduler), MangaFilter by filter {
|
|
|
|
|
|
|
|
|
|
|
|
val source = savedStateHandle.require<MangaSource>(RemoteListFragment.ARG_SOURCE)
|
|
|
|
val source = MangaSource(savedStateHandle[RemoteListFragment.ARG_SOURCE])
|
|
|
|
val isRandomLoading = MutableStateFlow(false)
|
|
|
|
val isRandomLoading = MutableStateFlow(false)
|
|
|
|
val onOpenManga = MutableEventFlow<Manga>()
|
|
|
|
val onOpenManga = MutableEventFlow<Manga>()
|
|
|
|
|
|
|
|
|
|
|
|
|