More SQLDelight migrations
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
package eu.kanade.tachiyomi.ui.browse.migration.manga
|
||||
|
||||
import android.os.Bundle
|
||||
import eu.kanade.domain.manga.interactor.GetFavoritesBySourceId
|
||||
import eu.kanade.domain.manga.interactor.GetFavorites
|
||||
import eu.kanade.domain.manga.model.Manga
|
||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||
import eu.kanade.tachiyomi.util.lang.launchIO
|
||||
@@ -16,7 +16,7 @@ import uy.kohesive.injekt.api.get
|
||||
|
||||
class MigrationMangaPresenter(
|
||||
private val sourceId: Long,
|
||||
private val getFavoritesBySourceId: GetFavoritesBySourceId = Injekt.get(),
|
||||
private val getFavorites: GetFavorites = Injekt.get(),
|
||||
) : BasePresenter<MigrationMangaController>() {
|
||||
|
||||
private val _state: MutableStateFlow<MigrateMangaState> = MutableStateFlow(MigrateMangaState.Loading)
|
||||
@@ -25,7 +25,7 @@ class MigrationMangaPresenter(
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
super.onCreate(savedState)
|
||||
presenterScope.launchIO {
|
||||
getFavoritesBySourceId
|
||||
getFavorites
|
||||
.subscribe(sourceId)
|
||||
.catch { exception ->
|
||||
_state.value = MigrateMangaState.Error(exception)
|
||||
|
||||
Reference in New Issue
Block a user