Skip to content

fix: preserve divina scroll position after rotation reload#697

Merged
everpcpc merged 2 commits intomainfrom
codex/fix-divina-scroll-rotation-reload
Mar 26, 2026
Merged

fix: preserve divina scroll position after rotation reload#697
everpcpc merged 2 commits intomainfrom
codex/fix-divina-scroll-rotation-reload

Conversation

@everpcpc
Copy link
Copy Markdown
Owner

Problem

In DIVINA scroll mode, rapidly swiping a few pages and then immediately rotating the device could trigger a reader reload that restored the page from before the swipe burst. The visible page had not been synchronized back into ReaderViewModel before the scroll container was rebuilt.

Approach

Capture the current scroll anchor right before the native scroll container is dismantled and write that item back into ReaderViewModel immediately. This keeps the next reader instance aligned with the page the user was actually looking at when orientation-driven reload happens.

Scope

  • sync the current visible scroll anchor during ScrollPageView teardown on iOS/tvOS
  • mirror the same teardown synchronization on macOS for parity
  • bump the build version to 382

Validation

  • make build-ios-ci
  • make build-macos-ci
  • make build-tvos-ci

Synchronize the visible scroll-page anchor back into ReaderViewModel before the scroll container is dismantled.

This prevents orientation-driven reader reloads from restoring an older committed page after rapid swipe navigation in DIVINA scroll mode.
@everpcpc everpcpc merged commit 5f44f61 into main Mar 26, 2026
3 checks passed
@everpcpc everpcpc deleted the codex/fix-divina-scroll-rotation-reload branch March 26, 2026 11:42
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