Cherry pick fixes

This commit is contained in:
Jobobby04 2022-10-29 18:03:25 -04:00
parent 37207ed58b
commit 9d84481770
2 changed files with 2 additions and 5 deletions

View File

@ -19,10 +19,9 @@ import eu.kanade.tachiyomi.util.system.logcat
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.combine
import kotlinx.coroutines.flow.debounce
import kotlinx.coroutines.flow.flowOf
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.launchIn
@ -60,7 +59,7 @@ class SourcesPresenter(
fun onCreate() {
// SY -->
combine(
getEnabledSources.subscribe(), // Avoid crashes due to LazyColumn rendering
getEnabledSources.subscribe().stateIn(presenterScope, SharingStarted.Eagerly, emptyList()), // Avoid crashes due to LazyColumn rendering
getSourceCategories.subscribe(),
getShowLatest.subscribe(controllerMode),
flowOf(controllerMode == SourcesController.Mode.CATALOGUE),
@ -71,7 +70,6 @@ class SourcesPresenter(
_events.send(Event.FailedFetchingSources)
}
.flowOn(Dispatchers.IO)
.stateIn(presenterScope)
.launchIn(presenterScope)
// SY <--
}

View File

@ -57,7 +57,6 @@ import eu.kanade.tachiyomi.data.notification.Notifications
import eu.kanade.tachiyomi.databinding.ReaderActivityBinding
import eu.kanade.tachiyomi.source.SourceManager
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.ui.base.activity.BaseRxActivity
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.manga.MangaController