Fix mark existing duplicate read chapters as read option not working in some cases (mihonapp/mihon#1944)

(cherry picked from commit 9972fa1053d19191871e52d48a9fd56b22fbc708)
This commit is contained in:
Cuong-Tran 2025-05-14 14:04:17 +07:00
parent 3f594fe4a4
commit a18cc3e6a9
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2

View file

@ -743,13 +743,10 @@ class ReaderViewModel @JvmOverloads constructor(
// SY --> // SY -->
if (manga?.isEhBasedManga() == true) { if (manga?.isEhBasedManga() == true) {
viewModelScope.launchNonCancellable { viewModelScope.launchNonCancellable {
val chapterUpdates = chapterList val chapterUpdates = unfilteredChapterList
.filter { it.chapter.source_order > readerChapter.chapter.source_order } .filter { it.sourceOrder > readerChapter.chapter.source_order }
.map { chapter -> .map { chapter ->
ChapterUpdate( ChapterUpdate(id = chapter.id, read = true)
id = chapter.chapter.id!!,
read = true,
)
} }
updateChapter.awaitAll(chapterUpdates) updateChapter.awaitAll(chapterUpdates)
} }