diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsReaderScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsReaderScreen.kt
index cc327de215..d96a0cfdf9 100644
--- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsReaderScreen.kt
+++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsReaderScreen.kt
@@ -135,6 +135,10 @@ object SettingsReaderScreen : SearchableSettings {
pref = readerPreferences.skipFiltered(),
title = stringResource(R.string.pref_skip_filtered_chapters),
),
+ Preference.PreferenceItem.SwitchPreference(
+ pref = readerPreferences.skipDupe(),
+ title = stringResource(R.string.pref_skip_dupe_chapters),
+ ),
Preference.PreferenceItem.SwitchPreference(
pref = readerPreferences.alwaysShowChapterTransition(),
title = stringResource(R.string.pref_always_show_chapter_transition),
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt
index 8bbd042c05..d8c9c7896a 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderViewModel.kt
@@ -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
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt
index c9b577c177..a80295ddc5 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/setting/ReaderPreferences.kt
@@ -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
diff --git a/i18n/src/main/res/values/strings.xml b/i18n/src/main/res/values/strings.xml
index f9489a1eb8..ef0f1dd5a6 100644
--- a/i18n/src/main/res/values/strings.xml
+++ b/i18n/src/main/res/values/strings.xml
@@ -337,6 +337,7 @@
Keep screen on
Skip chapters marked read
Skip filtered chapters
+ Skip duplicate chapters
Navigation
Volume keys
Invert volume keys