Improve duplicate chapter set as read
This commit is contained in:
parent
6c6f09ac5a
commit
cc7b8a9b69
@ -693,13 +693,15 @@ class ReaderViewModel @JvmOverloads constructor(
|
|||||||
// SY <--
|
// SY <--
|
||||||
readerChapter.chapter.read = true
|
readerChapter.chapter.read = true
|
||||||
// SY -->
|
// SY -->
|
||||||
if (readerPreferences.markReadDupe().get()) {
|
if (readerChapter.chapter.chapter_number > 0 && readerPreferences.markReadDupe().get()) {
|
||||||
getChaptersByMangaId.await(manga!!.id).sortedByDescending { it.sourceOrder }
|
getChaptersByMangaId.await(manga!!.id).sortedByDescending { it.sourceOrder }
|
||||||
.filter {
|
.filter {
|
||||||
!it.read && it.chapterNumber > 0.0 &&
|
it.id != readerChapter.chapter.id &&
|
||||||
|
!it.read &&
|
||||||
it.chapterNumber.toFloat() == readerChapter.chapter.chapter_number
|
it.chapterNumber.toFloat() == readerChapter.chapter.chapter_number
|
||||||
}
|
}
|
||||||
.also { setReadStatus.await(true, *it.toTypedArray()) }
|
.ifEmpty { null }
|
||||||
|
?.also { setReadStatus.await(true, *it.toTypedArray()) }
|
||||||
}
|
}
|
||||||
if (manga?.isEhBasedManga() == true) {
|
if (manga?.isEhBasedManga() == true) {
|
||||||
viewModelScope.launchNonCancellable {
|
viewModelScope.launchNonCancellable {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user