From 60456fe0e95966134c47f0f8401eef001690f8e0 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 8 Jan 2023 22:12:53 -0500 Subject: [PATCH] Fix crash in categories screen on config change Fixes #8861 --- .../eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt index 19ee7df94..1ecb89bbe 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryScreenModel.kt @@ -13,7 +13,7 @@ import eu.kanade.domain.category.model.Category import eu.kanade.tachiyomi.R import kotlinx.coroutines.channels.Channel import kotlinx.coroutines.flow.collectLatest -import kotlinx.coroutines.flow.consumeAsFlow +import kotlinx.coroutines.flow.receiveAsFlow import kotlinx.coroutines.flow.update import kotlinx.coroutines.launch import uy.kohesive.injekt.Injekt @@ -28,7 +28,7 @@ class CategoryScreenModel( ) : StateScreenModel(CategoryScreenState.Loading) { private val _events: Channel = Channel() - val events = _events.consumeAsFlow() + val events = _events.receiveAsFlow() init { coroutineScope.launch {