Skip to content

Persist auto page turn interval per book#192

Merged
uxjulia merged 19 commits into
developmentfrom
fix/per-book-auto-turn-interval
May 24, 2026
Merged

Persist auto page turn interval per book#192
uxjulia merged 19 commits into
developmentfrom
fix/per-book-auto-turn-interval

Conversation

@uxjulia
Copy link
Copy Markdown
Owner

@uxjulia uxjulia commented May 23, 2026

Summary

  • Stores each EPUB book's last non-None Auto Page Turn interval in reader_settings.bin under that book's cache folder.
  • Seeds the interval picker from the saved per-book value on reopen, while keeping Auto Page Turn disabled until the user turns it on.
  • Documents the new per-book settings file and adds an Unreleased changelog entry.

Root Cause

The Auto Page Turn picker previously used pageTurnDuration, which only lived in the active EpubReaderActivity instance. Reopening a book reset that value to 0, so the picker fell back to the default interval instead of the user's last chosen interval.

Validation

  • pio run -e simulator
  • pio run -e tiny

Hardware QA

  1. Open book A, set Auto Page Turn to a non-default interval, then stop Auto Page Turn with None or by backing out.
  2. Leave and reopen book A, then open Auto Page Turn again. The picker should start on the saved interval.
  3. Open book B and confirm it uses its own saved interval or the default when none has been saved.

StanleyDudek and others added 2 commits May 22, 2026 16:18
…tation

With CW, CCW, Inverted orientations

When in Reader

If you open Book menu > Reader Options > Customize Status Bar

The preview is drawn in the incorrect location due to a hardcoded offset, this commit sets this to change based on orientation
@uxjulia uxjulia linked an issue May 23, 2026 that may be closed by this pull request
@uxjulia uxjulia marked this pull request as ready for review May 24, 2026 14:36
@uxjulia uxjulia merged commit d23b7ea into development May 24, 2026
4 checks passed
@uxjulia uxjulia deleted the fix/per-book-auto-turn-interval branch May 24, 2026 14:37
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c8c6f6a431

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +194 to +195
setError("Could not read device id");
return;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Localize nearby-sync error strings

The new activity shows raw English error literals directly to users (for example via setError("Could not read device id") and then rendering errorMessage_), which bypasses the existing tr(STR_*) localization path and breaks non-English UI behavior. This violates the repo’s UI-string rule and makes the new flow inconsistent with the rest of the product in translated builds.

Useful? React with 👍 / 👎.

Comment on lines +374 to +377
peerSeen_ = true;
peerSourceMac_ = event.sourceMac;
peerDeviceMac_ = event.deviceMac;
peerId_ = bytesToHex(peerDeviceMac_.data(), peerDeviceMac_.size());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bind sync state to a single peer per session

While syncing, each incoming packet overwrites peerSourceMac_/peerDeviceMac_ unconditionally, so packets from different nearby readers can mix into one session. In a multi-device environment, an ACK from reader B can satisfy localStatsAcked_ for stats saved from reader A, and subsequent retries are sent to the wrong peer MAC, causing false “synced” success or partial exchange. The session should lock onto the first peer for an attempt and ignore other senders until reset.

Useful? React with 👍 / 👎.

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.

Remember Auto Page Turn setting

3 participants