mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-10 10:17:48 +01:00
Prioritize finding selected chapter when deduping reader chapters
Fixes #9054
(cherry picked from commit 23432e4405
)
This commit is contained in:
parent
48546c3db4
commit
5ef11e61d0
1 changed files with 4 additions and 3 deletions
|
@ -177,10 +177,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…
Reference in a new issue