Cherry pick fix

This commit is contained in:
Jobobby04 2022-11-01 12:46:46 -04:00
parent dd08da26e8
commit 35bd6233d9

View File

@ -20,7 +20,6 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.combine import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.flowOf
@ -60,7 +59,7 @@ class SourcesPresenter(
fun onCreate() { fun onCreate() {
// SY --> // SY -->
combine( combine(
getEnabledSources.subscribe().stateIn(presenterScope, SharingStarted.Eagerly, emptyList()), // Avoid crashes due to LazyColumn rendering getEnabledSources.subscribe(),
getSourceCategories.subscribe(), getSourceCategories.subscribe(),
getShowLatest.subscribe(controllerMode), getShowLatest.subscribe(controllerMode),
flowOf(controllerMode == SourcesController.Mode.CATALOGUE), flowOf(controllerMode == SourcesController.Mode.CATALOGUE),