Files
crosspoint-reader-mod/chat-summaries/2026-03-09_03-15-summary.md

24 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

# BookInfo Loading Popup for Unopened Books
**Date**: 2026-03-09
**Task**: Show a progress popup when BookInfo needs to parse an unopened book
## Changes Made
### BookInfoActivity.cpp
Added a "Loading..." progress popup with progress bar to `onEnter()` when the book cache doesn't exist and a full parse is required:
- **EPUB branch**: `epub.load(false, true)` is tried first (fast, cache-only). If it fails, `GUI.drawPopup(tr(STR_LOADING))` is shown at 10%, `epub.load(true, true)` runs (slow full parse), progress updates to 50%, thumbnail generation runs, then progress hits 100%.
- **XTC branch**: Checks `Storage.exists(xtc.getCachePath())` before `xtc.load()`. If cache directory is missing, shows the same popup pattern around load + thumbnail generation.
- For books with existing cache, no popup is shown — the fast path completes silently.
## Build Result
Build succeeded — 0 errors, 0 linter warnings. RAM: 30.3%, Flash: 95.7%.
## Follow-up
- Test on device: open BookInfo for a book that has never been opened, verify popup appears
- Verify no popup appears for books that have been previously opened/cached