Delete duplicate downloaded chapters when they are automatically marked as read (#1252)

This commit is contained in:
NGB-Was-Taken 2024-08-18 06:09:29 +05:45 committed by GitHub
parent 7ec14cd9f0
commit 71f2daf8f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -707,7 +707,12 @@ class ReaderViewModel @JvmOverloads constructor(
it.chapterNumber.toFloat() == readerChapter.chapter.chapter_number
}
.ifEmpty { null }
?.also { setReadStatus.await(true, *it.toTypedArray()) }
?.also {
setReadStatus.await(true, *it.toTypedArray())
it.forEach { chapter ->
deleteChapterIfNeeded(ReaderChapter(chapter))
}
}
}
if (manga?.isEhBasedManga() == true) {
viewModelScope.launchNonCancellable {