From 2a3c3d8d6afa12f6e022acba8692167e5fe1593a Mon Sep 17 00:00:00 2001 From: stevenyomi <95685115+stevenyomi@users.noreply.github.com> Date: Sun, 8 Jan 2023 04:13:08 +0800 Subject: [PATCH] Fix reader settings sheet's mode section not updated (#8857) --- .../main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt index b972b84b77..8bbd042c05 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt @@ -60,6 +60,7 @@ import eu.kanade.tachiyomi.util.storage.DiskUtil import eu.kanade.tachiyomi.util.storage.cacheImageDir import eu.kanade.tachiyomi.util.system.isOnline import eu.kanade.tachiyomi.util.system.logcat +import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll import kotlinx.coroutines.channels.Channel @@ -610,7 +611,7 @@ class ReaderViewModel( */ fun setMangaReadingMode(readingModeType: Int) { val manga = manga ?: return - viewModelScope.launchIO { + runBlocking(Dispatchers.IO) { setMangaViewerFlags.awaitSetMangaReadingMode(manga.id, readingModeType.toLong()) val currChapters = state.value.viewerChapters if (currChapters != null) {