Remove unnecessary withIOContext
(cherry picked from commit d1bf8570797c891876b0c5fa2d9c210dc883f8a7) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceScreenModel.kt
This commit is contained in:
parent
166461e20f
commit
f909cfe0ce
@ -58,7 +58,6 @@ 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.launchNonCancellable
|
import tachiyomi.core.util.lang.launchNonCancellable
|
||||||
import tachiyomi.core.util.lang.withIOContext
|
|
||||||
import tachiyomi.core.util.lang.withUIContext
|
import tachiyomi.core.util.lang.withUIContext
|
||||||
import tachiyomi.core.util.system.logcat
|
import tachiyomi.core.util.system.logcat
|
||||||
import tachiyomi.domain.UnsortedPreferences
|
import tachiyomi.domain.UnsortedPreferences
|
||||||
@ -198,20 +197,18 @@ open class BrowseSourceScreenModel(
|
|||||||
// SY <--
|
// SY <--
|
||||||
}.flow.map { pagingData ->
|
}.flow.map { pagingData ->
|
||||||
pagingData.map { (it, metadata) ->
|
pagingData.map { (it, metadata) ->
|
||||||
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)
|
}
|
||||||
}
|
.filterNotNull()
|
||||||
.filterNotNull()
|
.filter { localManga ->
|
||||||
.filter { localManga ->
|
!sourcePreferences.hideInLibraryItems().get() || !localManga.favorite
|
||||||
!sourcePreferences.hideInLibraryItems().get() || !localManga.favorite
|
}
|
||||||
}
|
// SY -->
|
||||||
// SY -->
|
.combineMetadata(metadata)
|
||||||
.combineMetadata(metadata)
|
// SY <--
|
||||||
// SY <--
|
.stateIn(coroutineScope)
|
||||||
.stateIn(coroutineScope)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.cachedIn(coroutineScope)
|
.cachedIn(coroutineScope)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user