potential fix for not jumping to reading position sometimes

This commit is contained in:
Stefan Hardegger
2026-02-16 17:12:55 +01:00
parent 28fa346b63
commit 02fa9dab4f
5 changed files with 118 additions and 20 deletions

View File

@@ -307,10 +307,11 @@ public class Story {
this.isRead = true;
this.lastReadAt = LocalDateTime.now();
// Set reading position to the end of content if available
if (contentPlain != null) {
this.readingPosition = contentPlain.length();
} else if (contentHtml != null) {
// ALWAYS use contentHtml for consistency (frontend uses contentHtml for position tracking)
if (contentHtml != null) {
this.readingPosition = contentHtml.length();
} else if (contentPlain != null) {
this.readingPosition = contentPlain.length();
}
}