Handle chapter read status in correct order
Fixes #9687 (cherry picked from commit 1e3d9a00f2366919430a8077ad79808c8514d793) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt
This commit is contained in:
parent
9a90a00651
commit
05a88dd6de
@ -617,15 +617,6 @@ class ReaderViewModel(
|
|||||||
readerChapter.requestedPage = pageIndex
|
readerChapter.requestedPage = pageIndex
|
||||||
readerChapter.chapter.last_page_read = pageIndex
|
readerChapter.chapter.last_page_read = pageIndex
|
||||||
|
|
||||||
updateChapter.await(
|
|
||||||
ChapterUpdate(
|
|
||||||
id = readerChapter.chapter.id!!,
|
|
||||||
read = readerChapter.chapter.read,
|
|
||||||
bookmark = readerChapter.chapter.bookmark,
|
|
||||||
lastPageRead = readerChapter.chapter.last_page_read.toLong(),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
if (readerChapter.pages?.lastIndex == pageIndex) {
|
if (readerChapter.pages?.lastIndex == pageIndex) {
|
||||||
readerChapter.chapter.read = true
|
readerChapter.chapter.read = true
|
||||||
// SY -->
|
// SY -->
|
||||||
@ -646,6 +637,15 @@ class ReaderViewModel(
|
|||||||
updateTrackChapterRead(readerChapter)
|
updateTrackChapterRead(readerChapter)
|
||||||
deleteChapterIfNeeded(readerChapter)
|
deleteChapterIfNeeded(readerChapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateChapter.await(
|
||||||
|
ChapterUpdate(
|
||||||
|
id = readerChapter.chapter.id!!,
|
||||||
|
read = readerChapter.chapter.read,
|
||||||
|
bookmark = readerChapter.chapter.bookmark,
|
||||||
|
lastPageRead = readerChapter.chapter.last_page_read.toLong(),
|
||||||
|
),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user