mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-21 11:41:48 +01:00
Process chapter duplicates after sorting
Closes #9255, sort of. The example is a bad edge case though, where chapter numbers are repeated across versions, so realistically only the first 113 will appear but the later 113(s) won't despite being "different". Those realistically should be in different manga entries, not all mixed together, so this is just a crappy source.
This commit is contained in:
parent
6bdc1b676e
commit
9339ea4196
@ -172,16 +172,17 @@ class ReaderViewModel(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else -> chapters
|
else -> chapters
|
||||||
}.run {
|
|
||||||
if (readerPreferences.skipDupe().get()) {
|
|
||||||
removeDuplicates(selectedChapter)
|
|
||||||
} else {
|
|
||||||
this
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
chaptersForReader
|
chaptersForReader
|
||||||
.sortedWith(getChapterSort(manga, sortDescending = false))
|
.sortedWith(getChapterSort(manga, sortDescending = false))
|
||||||
|
.run {
|
||||||
|
if (readerPreferences.skipDupe().get()) {
|
||||||
|
removeDuplicates(selectedChapter)
|
||||||
|
} else {
|
||||||
|
this
|
||||||
|
}
|
||||||
|
}
|
||||||
.map { it.toDbChapter() }
|
.map { it.toDbChapter() }
|
||||||
.map(::ReaderChapter)
|
.map(::ReaderChapter)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user