diff --git a/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DownloadDialogHelper.kt b/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DownloadDialogHelper.kt index 112382d2f..7fa8ef877 100644 --- a/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DownloadDialogHelper.kt +++ b/app/src/main/kotlin/org/koitharu/kotatsu/details/ui/DownloadDialogHelper.kt @@ -28,7 +28,7 @@ class DownloadDialogHelper( } if (history != null) { - val unreadChapters = branchChapters.takeLastWhile { it.id != history.chapterId } + val unreadChapters = branchChapters.dropWhile { it.id != history.chapterId } if (unreadChapters.isNotEmpty() && unreadChapters.size < branchChapters.size) { add(DownloadOption.AllUnreadChapters(unreadChapters.ids(), branch)) if (unreadChapters.size > 5) {