Update lastPageRead on chapter update (#939)

Broken with 729385588a3d8e06ec8be38865a12c47e88f6bcb...
This commit is contained in:
schroda
2024-04-28 16:35:33 +02:00
committed by GitHub
parent 729385588a
commit cf1ede9cf7

View File

@@ -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
}
}