Skip to content

Fix saved reading progress reverting to an earlier page - #111

Merged
LandWarderer2772 merged 1 commit into
AppFuton:develfrom
PoonHarpoon:fix/reader-progress-save-race
Sep 19, 2026
Merged

LandWarderer2772 merged 1 commit into
AppFuton:develfrom
PoonHarpoon:fix/reader-progress-save-race

Conversation

@PoonHarpoon

@PoonHarpoon PoonHarpoon commented Sep 8, 2026

Copy link
Copy Markdown

Your saved position can move backwards after you finish reading: a chapter you reached the end of can
reopen on an earlier page and show 99% progress again, or progress can be lost or messed up entirely. This can happen when a slow progress calculation
finishes after the reader has already saved your newer position, replacing that save with older information.

Before writing a recalculated percentage, check that the saved history has not changed since the calculation
started. Keep the check and write together in a short database transaction so a newer save cannot slip
between them. The fix changes one production file, with six net added lines; existing reader save callbacks
and percentage calculations stay as they are.

I compiled the APK and tested it on my phone and an emulator; both are working as expected.

Tests added.

@github-project-automation github-project-automation Bot moved this to Backlog in Futon project Sep 8, 2026
@LandWarderer2772
LandWarderer2772 merged commit af2688f into AppFuton:devel Sep 19, 2026
1 check failed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Futon project Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants