Skip to content

feat(reader): add keep-screen-awake setting for reading sessions - #964

Merged
everpcpc merged 3 commits into
mainfrom
feat/keep-screen-awake
Aug 23, 2026
Merged

feat(reader): add keep-screen-awake setting for reading sessions#964
everpcpc merged 3 commits into
mainfrom
feat/keep-screen-awake

Conversation

@everpcpc

@everpcpc everpcpc commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

Implements #953: an option to keep the screen awake while reading. Users who stay on one page for a while currently have the screen dim or lock mid-reading.

Changes

  • New Settings → Reader → Reading page (iOS/tvOS) following the existing settings pattern (SettingsSection + NavDestination + dedicated detail view). It is scoped to reader-global session behavior that has no per-reader meaning — starting with the "Keep Screen Awake While Reading" toggle, which defaults to off. Existing per-reader keys (tap zones, overlay toggles, keyboard help) are intentionally untouched.
  • A keepScreenAwakeWhileReading() view modifier toggles UIApplication.isIdleTimerDisabled for the lifetime of a reading session. It is applied once in BookReaderView, so it covers all three readers (DIVINA, EPUB, native PDF) and restores normal behavior when the reader closes or the setting is turned off mid-session.
  • macOS is unaffected (no idle timer; reader runs in separate windows), and the Reading page is not listed there.
  • All new strings localized in the 10 supported languages.

Validation

  • make build-ios / make build-macos / make build-tvos all pass; make localize run, translate.py list reports no missing translations.

Adds a global Settings -> Reader toggle that keeps the screen from
dimming or locking while any reader is open (DIVINA, EPUB, and PDF),
defaulting to off (issue #953). BookReaderView applies the idle-timer
state for the whole reading session and restores it on close. iOS and
tvOS only; macOS reader windows are unaffected.
Follow the existing settings pattern (SettingsSection + NavDestination +
detail page) instead of an inline toggle on the settings root. The new
Reading page is scoped to reader-global session behavior with no
per-reader meaning, starting with keep-screen-awake; existing per-reader
keys are intentionally left untouched.
@everpcpc
everpcpc marked this pull request as ready for review August 23, 2026 12:05
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@everpcpc
everpcpc merged commit bbf3408 into main Aug 23, 2026
3 checks passed
@everpcpc
everpcpc deleted the feat/keep-screen-awake branch August 23, 2026 12:05
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