mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 05:27:28 +01:00
Add Reader Setting to Skip Dupe Chapters (#8831)
Add reader setting to filter dupe chapters with same scanlator priority.
This commit is contained in:
@@ -183,6 +183,16 @@ class ReaderViewModel(
|
||||
}
|
||||
}
|
||||
else -> chapters
|
||||
}.run {
|
||||
if (readerPreferences.skipDupe().get()) {
|
||||
groupBy { it.chapterNumber }
|
||||
.mapValues { (_, chapters) ->
|
||||
chapters.find { it.id == chapterId || it.scanlator == selectedChapter.scanlator } ?: chapters.first()
|
||||
}
|
||||
.values
|
||||
} else {
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
chaptersForReader
|
||||
|
||||
@@ -60,6 +60,8 @@ class ReaderPreferences(
|
||||
|
||||
fun skipFiltered() = preferenceStore.getBoolean("skip_filtered", true)
|
||||
|
||||
fun skipDupe() = preferenceStore.getBoolean("skip_dupe", false)
|
||||
|
||||
// endregion
|
||||
|
||||
// region Split two page spread
|
||||
|
||||
Reference in New Issue
Block a user