From cf1ede9cf70a2d72a7ff84b9ead24a394ceee2ce Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Sun, 28 Apr 2024 16:35:33 +0200 Subject: [PATCH] Update lastPageRead on chapter update (#939) Broken with 729385588a3d8e06ec8be38865a12c47e88f6bcb... --- .../suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt b/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt index 3159a675..76c1a51e 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/graphql/mutations/ChapterMutation.kt @@ -79,7 +79,7 @@ class ChapterMutation { this[ChapterTable.isBookmarked] = it } patch.lastPageRead?.also { - this[ChapterTable.lastPageRead] = it.coerceAtMost(chapterIdToPageCount[it] ?: 0).coerceAtLeast(0) + this[ChapterTable.lastPageRead] = it.coerceAtMost(chapterIdToPageCount[chapterId] ?: 0).coerceAtLeast(0) this[ChapterTable.lastReadAt] = now } }