mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 07:11:49 +01:00
Remove unnecessary withIOContext
This commit is contained in:
parent
1814b3b22c
commit
d1bf857079
@ -9,7 +9,6 @@ import androidx.compose.ui.unit.dp
|
|||||||
import androidx.paging.Pager
|
import androidx.paging.Pager
|
||||||
import androidx.paging.PagingConfig
|
import androidx.paging.PagingConfig
|
||||||
import androidx.paging.cachedIn
|
import androidx.paging.cachedIn
|
||||||
import androidx.paging.filter
|
|
||||||
import androidx.paging.map
|
import androidx.paging.map
|
||||||
import cafe.adriel.voyager.core.model.StateScreenModel
|
import cafe.adriel.voyager.core.model.StateScreenModel
|
||||||
import cafe.adriel.voyager.core.model.coroutineScope
|
import cafe.adriel.voyager.core.model.coroutineScope
|
||||||
@ -32,7 +31,6 @@ import kotlinx.coroutines.flow.emptyFlow
|
|||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filter
|
||||||
import kotlinx.coroutines.flow.filterNotNull
|
import kotlinx.coroutines.flow.filterNotNull
|
||||||
import kotlinx.coroutines.flow.firstOrNull
|
import kotlinx.coroutines.flow.firstOrNull
|
||||||
import kotlinx.coroutines.flow.flow
|
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
import kotlinx.coroutines.flow.stateIn
|
import kotlinx.coroutines.flow.stateIn
|
||||||
import kotlinx.coroutines.flow.update
|
import kotlinx.coroutines.flow.update
|
||||||
@ -41,7 +39,6 @@ import logcat.LogPriority
|
|||||||
import tachiyomi.core.preference.CheckboxState
|
import tachiyomi.core.preference.CheckboxState
|
||||||
import tachiyomi.core.preference.mapAsCheckboxState
|
import tachiyomi.core.preference.mapAsCheckboxState
|
||||||
import tachiyomi.core.util.lang.launchIO
|
import tachiyomi.core.util.lang.launchIO
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.util.system.logcat
|
||||||
import tachiyomi.domain.category.interactor.GetCategories
|
import tachiyomi.domain.category.interactor.GetCategories
|
||||||
import tachiyomi.domain.category.interactor.SetMangaCategories
|
import tachiyomi.domain.category.interactor.SetMangaCategories
|
||||||
@ -120,7 +117,6 @@ class BrowseSourceScreenModel(
|
|||||||
getRemoteManga.subscribe(sourceId, listing.query ?: "", listing.filters)
|
getRemoteManga.subscribe(sourceId, listing.query ?: "", listing.filters)
|
||||||
}.flow.map { pagingData ->
|
}.flow.map { pagingData ->
|
||||||
pagingData.map {
|
pagingData.map {
|
||||||
withIOContext {
|
|
||||||
networkToLocalManga.await(it.toDomainManga(sourceId))
|
networkToLocalManga.await(it.toDomainManga(sourceId))
|
||||||
.let { localManga ->
|
.let { localManga ->
|
||||||
getManga.subscribe(localManga.url, localManga.source)
|
getManga.subscribe(localManga.url, localManga.source)
|
||||||
@ -132,7 +128,6 @@ class BrowseSourceScreenModel(
|
|||||||
.stateIn(coroutineScope)
|
.stateIn(coroutineScope)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.cachedIn(coroutineScope)
|
.cachedIn(coroutineScope)
|
||||||
}
|
}
|
||||||
.stateIn(coroutineScope, SharingStarted.Lazily, emptyFlow())
|
.stateIn(coroutineScope, SharingStarted.Lazily, emptyFlow())
|
||||||
|
Loading…
Reference in New Issue
Block a user