Skip to content

feat: add e-ink mode setting with tap-to-scroll - #178

Open
dalekirkwood wants to merge 1 commit into
jensomato:developfrom
dalekirkwood:feat/eink-mode
Open

feat: add e-ink mode setting with tap-to-scroll#178
dalekirkwood wants to merge 1 commit into
jensomato:developfrom
dalekirkwood:feat/eink-mode

Conversation

@dalekirkwood

@dalekirkwood dalekirkwood commented Jul 26, 2026

Copy link
Copy Markdown

Summary

Adds a manual e-ink mode toggle under UI Settings. When enabled:

  • Tap zones in the reader: tap the bottom half of the screen to page down one viewport, tap the top half to page up. Uses non-animated scrollTo for clean e-ink refreshes (no ghosting from animation frames).
  • Drag-scrolling disabled in the reader. Only tap-to-page works, which is the standard e-reader paradigm.
  • Navigation transitions disabled: instant screen changes instead of fade animations.
  • Header image crossfade disabled: crisp image load, no fade ghosting.
  • B&W color scheme: pure black on white for all app chrome (toolbar, cards, FAB, drawer). Distinct gray steps that e-ink panels can actually distinguish.
  • E-ink article template: pure black text on white, font-weight: 500 for thicker rendering, black underlined links, no colored elements.

The setting is off by default: existing users see zero behavior change.

Implementation

Follows the existing scrollToProgressEnabled toggle pattern:

  • SettingsDataStore + SettingsDataStoreImpl: new eInkMode pref (SharedPreferences-backed, with reactive StateFlow)
  • UiSettingsViewModel / UiSettingsScreen: new Switch row
  • BookmarkDetailScreen: invisible overlay Box on top of the content intercepts taps (WebView consumes touches, so the overlay must sit above it); verticalScroll(scrollState, enabled = !eInkMode) disables drag-scrolling
  • MainActivity: conditional NavHost transitions; ReadeckAppTheme accepts eInkMode to switch color scheme
  • html_template_eink.html: new Sakura.css variant stripped of all color
  • BookmarkDetailViewModel: template flow switches to e-ink template when mode is on

Known limitations

  • Site-name click in reader does not work in e-ink mode. The tap-zone overlay covers the full screen, so the clickable site-name row (which opens the article URL in a browser) is intercepted. The FAB menu and back button are unaffected.
  • BookmarkDetailViewModel reads eInkMode once in init (non-reactive), consistent with the existing scrollToProgressEnabled pattern. Toggling the setting while reading an article takes effect on next article open.

Test plan

  • ./gradlew compileGithubReleaseDebugKotlin passes
  • ./gradlew testGithubReleaseDebugUnitTest all tests pass
  • Manual: toggle e-ink mode on, nav transitions are instant
  • Manual: open an article, tap bottom half pages down, tap top half pages up
  • Manual: e-ink mode off is identical to current behavior
  • Manual: B&W color scheme applied to list, settings, and reader
  • Manual: article content is pure black on white with thicker text
  • Manual: drag-scrolling is disabled in the reader when e-ink mode is on

Files changed

14 files, +427/-42 lines. No new modules, no new dependencies.

Adds a manual e-ink mode toggle under UI settings. When enabled:

- Navigation transitions are disabled (instant screen changes)
- Header image crossfade is disabled (avoids ghosting on load)
- Tap zones activate in the reader: tap the bottom half of the
  screen to page down one viewport, tap the top half to page up.
  Uses non-animated scrollTo for clean e-ink refreshes.

The setting is off by default, so existing users see no behavior
change. Follows the existing scroll-to-progress toggle pattern.
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