mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-19 06:09:18 +01:00
Fix Mark previous as read
(#7396)
This commit is contained in:
parent
ef3acb8c43
commit
7440086ef1
@ -519,7 +519,7 @@ class MangaPresenter(
|
|||||||
|
|
||||||
fun markPreviousChapterRead(pointer: DomainChapter) {
|
fun markPreviousChapterRead(pointer: DomainChapter) {
|
||||||
val successState = successState ?: return
|
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 prevChapters = if (successState.manga.sortDescending()) chapters.asReversed() else chapters
|
||||||
val pointerPos = prevChapters.indexOf(pointer)
|
val pointerPos = prevChapters.indexOf(pointer)
|
||||||
if (pointerPos != -1) markChaptersRead(prevChapters.take(pointerPos), true)
|
if (pointerPos != -1) markChaptersRead(prevChapters.take(pointerPos), true)
|
||||||
|
Loading…
Reference in New Issue
Block a user