diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt index 22e36af075..63eea1037b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt @@ -414,14 +414,16 @@ class ReaderPresenter( * Returns the viewer position used by this manga or the default one. */ fun getMangaViewer(): Int { - val manga = manga ?: return preferences.defaultViewer() + val default = preferences.defaultViewer() + val manga = manga ?: return default val readerType = manga.defaultReaderType() - if (manga.viewer == -1 || - (readerType == ReaderActivity.WEBTOON && readerType != manga.viewer)) { - manga.viewer = readerType + if (manga.viewer == -1 || (readerType == ReaderActivity.WEBTOON && readerType != manga.viewer)) { + val cantSwitchToLTR = + (readerType == ReaderActivity.LEFT_TO_RIGHT && default != ReaderActivity.RIGHT_TO_LEFT) + manga.viewer = if (cantSwitchToLTR) 0 else readerType db.updateMangaViewer(manga).asRxObservable().subscribe() } - return if (manga.viewer == 0) preferences.defaultViewer() else manga.viewer + return if (manga.viewer == 0) default else manga.viewer } /**