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 dbb2ee06a..fe57e9342 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 @@ -86,6 +86,7 @@ import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.distinctUntilChanged +import kotlinx.coroutines.flow.drop import kotlinx.coroutines.flow.filterNotNull import kotlinx.coroutines.flow.first import kotlinx.coroutines.flow.firstOrNull @@ -252,6 +253,9 @@ class ReaderViewModel( state.map { it.viewerChapters?.currChapter } .distinctUntilChanged() .filterNotNull() + // SY --> + .drop(1) // allow the loader to set the first page and chapter id + // SY <- .onEach { currentChapter -> if (!currentChapter.chapter.read) { currentChapter.requestedPage = currentChapter.chapter.last_page_read