Commit Graph
15 Commits
Author SHA1 Message Date
jpirnay 07bdb10842 Fix button navigation 2026-05-14 18:44:49 +02:00
jpirnay da9ebb50e3 Fix inverted tilt behaviour 2026-05-14 17:23:31 +02:00
jpirnay 4982f803a7 A couple of fixes 2026-05-11 23:02:27 +02:00
jpirnay 2b1dbb6737 Add extended TiltModel 2026-05-11 16:29:40 +02:00
jpirnay 80eb889256 Add opds image download 2026-05-10 20:47:35 +02:00
jpirnay d4c0073b00 Fix double-click page turn 2026-04-27 14:02:38 +02:00
jpirnay 874373a167 Simplify 2026-04-27 10:42:39 +02:00
jpirnay edf7ce1ae2 Review comments 2026-04-26 17:57:26 +02:00
jpirnayandCopilot f0fe02d77a Update logic to avoid collision
Co-authored-by: Copilot <copilot@github.com>
2026-04-26 16:46:22 +02:00
jpirnay a1d0ddec49 Introduce extended button handler 2026-04-26 12:26:29 +02:00
jpirnay 63784b0331 Only make half refresh 2026-04-09 22:22:59 +02:00
jpirnay bcf49a943a Proper refresh on exit 2026-04-08 11:22:21 +02:00
jpirnay b3d6562cb6 Fix power button leak on startup 2026-04-08 10:14:35 +02:00
jpirnay 16fd0bbba1 Refresh screen on reader exit to heal ghosting 2026-04-07 22:10:17 +02:00
Uri Tauber c986a274ee refactor: reader utils (#1329)
## Summary

Extract shared reader utilities (`ReaderUtils.h`) to reduce duplication
across `EpubReaderActivity`, `TxtReaderActivity`, and (upcoming)
`MarkdownReaderActivity`.

  Utilities extracted:

   - `applyOrientation()` — orientation switch logic
   - `detectPageTurn()` — page navigation input detection
   - `renderAntiAliased()` — grayscale anti-aliasing pass
   - `displayWithRefreshCycle()` — refresh mode cadence
   - `GO_HOME_MS` — back button timing constant

  ## Impact

Flash: 32 bytes saved (6006441 → 6006409 bytes). Minimal immediate gain,
but meaningful once markdown reader and future reader types share these
functions.

Code quality: Eliminates ~100 lines of duplicated logic spread across
multiple files. All readers now follow the same patterns for
orientation, input handling, and rendering.

  ## Rationale

This refactor is preparation for markdown support, which requires
identical input and rendering logic. Instead of copy-pasting these
patterns a third time, all readers now share a single, tested
implementation. Future reader types can reuse `ReaderUtils` without
duplication.

  ---

  ## AI Usage

Did you use AI tools to help write this code? YES Claude extracted the
code, under my guidance. Tested on my device and seems to work fine.
2026-03-08 11:45:54 -05:00