From 7440086ef1bd63d499945afe1722d6648ab514ac Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Mon, 27 Jun 2022 19:37:30 +0600 Subject: [PATCH] Fix `Mark previous as read` (#7396) --- .../main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt index 84e50ccb06..52b09f8ea7 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt @@ -519,7 +519,7 @@ class MangaPresenter( fun markPreviousChapterRead(pointer: DomainChapter) { val successState = successState ?: return - val chapters = successState.chapters.map { it.chapter } + val chapters = processedChapters.orEmpty().map { it.chapter }.toList() val prevChapters = if (successState.manga.sortDescending()) chapters.asReversed() else chapters val pointerPos = prevChapters.indexOf(pointer) if (pointerPos != -1) markChaptersRead(prevChapters.take(pointerPos), true)