Skip to content

fix: preserve current page across reader state regeneration#664

Merged
everpcpc merged 1 commit intomainfrom
fix/divina-resume-spread-page-clobber
Mar 14, 2026
Merged

fix: preserve current page across reader state regeneration#664
everpcpc merged 1 commit intomainfrom
fix/divina-resume-spread-page-clobber

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

@everpcpc everpcpc commented Mar 14, 2026

Problem

Reader state regeneration could overwrite the actual current page with the primary page ID of the resolved view item. When the current item was a dual-page item, that collapsed the position back to the first page of the pair and could cause restore/navigation to drift away from the page the user was actually on.

Approach

Preserve the preferred current page whenever it still belongs to the resolved view item, and only fall back to the item's primary page ID when needed.

Scope

  • add a helper to resolve the current page ID while preserving the preferred page when it is still part of the current view item
  • use that helper during reader state regeneration
  • use that helper when committing the current position from a resolved view item

Validation

  • make format
  • make build-ios

@everpcpc everpcpc merged commit 94fe2cd into main Mar 14, 2026
3 checks passed
@everpcpc everpcpc deleted the fix/divina-resume-spread-page-clobber branch March 14, 2026 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant