Prioritize finding selected chapter when deduping reader chapters
Fixes #9054 (cherry picked from commit 23432e44050cd8638f070745edf77be75aeffe21) (cherry picked from commit 255eda6d8eff79efca2e892efea89e40be58a79f)
This commit is contained in:
parent
5384fd2d0f
commit
9b32d12b3a
@ -216,10 +216,11 @@ class ReaderViewModel(
|
||||
}.run {
|
||||
if (readerPreferences.skipDupe().get()) {
|
||||
groupBy { it.chapterNumber }
|
||||
.mapValues { (_, chapters) ->
|
||||
chapters.find { it.id == chapterId || it.scanlator == selectedChapter.scanlator } ?: chapters.first()
|
||||
.map { (_, chapters) ->
|
||||
chapters.find { it.id == selectedChapter.id }
|
||||
?: chapters.find { it.scanlator == selectedChapter.scanlator }
|
||||
?: chapters.first()
|
||||
}
|
||||
.values
|
||||
} else {
|
||||
this
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user