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:
parent
3f594fe4a4
commit
a18cc3e6a9
1 changed files with 3 additions and 6 deletions
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue