40 lines
2.5 KiB
Markdown
40 lines
2.5 KiB
Markdown
|
|
# Merge PR #979: Silent Pre-Indexing + Indexing Display Setting
|
||
|
|
|
||
|
|
**Date:** 2026-02-18
|
||
|
|
**Branch:** `mod/merge-upstream-pr-979`
|
||
|
|
|
||
|
|
## Task Description
|
||
|
|
|
||
|
|
Merged upstream PR #979 (silent pre-indexing for the next chapter) and implemented both "Possible Improvements" from the PR:
|
||
|
|
1. A user setting to choose between Popup, Status Bar Text, or Status Bar Icon for indexing feedback.
|
||
|
|
2. Status bar indicator rendering during silent pre-indexing.
|
||
|
|
|
||
|
|
## Changes Made
|
||
|
|
|
||
|
|
### PR #979 Cherry-Pick (2 files)
|
||
|
|
- **`src/activities/reader/EpubReaderActivity.h`** -- Added `silentIndexNextChapterIfNeeded()` method declaration and `silentIndexingActive` flag.
|
||
|
|
- **`src/activities/reader/EpubReaderActivity.cpp`** -- Moved viewport dimension calculations before the `!section` block. Added `silentIndexNextChapterIfNeeded()` implementation that pre-indexes the next chapter when the penultimate page is displayed.
|
||
|
|
|
||
|
|
### New "Indexing Display" Setting (5 files)
|
||
|
|
- **`src/CrossPointSettings.h`** -- Added `INDEXING_DISPLAY` enum (POPUP, STATUS_TEXT, STATUS_ICON) and `indexingDisplay` field.
|
||
|
|
- **`src/CrossPointSettings.cpp`** -- Added persistence (write/read) for the new setting at the end of the settings chain.
|
||
|
|
- **`src/SettingsList.h`** -- Registered the new Enum setting in the Display category.
|
||
|
|
- **`lib/I18n/I18nKeys.h`** -- Added 4 new string IDs: `STR_INDEXING_DISPLAY`, `STR_INDEXING_POPUP`, `STR_INDEXING_STATUS_TEXT`, `STR_INDEXING_STATUS_ICON`.
|
||
|
|
- **`lib/I18n/translations/*.yaml`** (8 files) -- Added translations for all 8 languages.
|
||
|
|
|
||
|
|
### Status Bar Indicator Implementation
|
||
|
|
- **`EpubReaderActivity.cpp`** -- Conditional popup logic: only shows popup when setting is POPUP; for STATUS_TEXT/STATUS_ICON, shows centered "Indexing..." text on blank screen during non-silent indexing. For silent pre-indexing, sets `silentIndexingActive` flag before rendering so `renderStatusBar()` draws the indicator (text or 8x8 hourglass icon) in the status bar.
|
||
|
|
- Defined an 8x8 1-bit hourglass bitmap icon (`kIndexingIcon`) for the icon mode.
|
||
|
|
|
||
|
|
## Build Verification
|
||
|
|
|
||
|
|
- PlatformIO build: SUCCESS
|
||
|
|
- RAM: 31.1% (101,820 / 327,680 bytes)
|
||
|
|
- Flash: 99.6% (6,525,028 / 6,553,600 bytes)
|
||
|
|
|
||
|
|
## Follow-Up Items
|
||
|
|
|
||
|
|
- Test on device: verify silent indexing triggers on penultimate page, verify all three display modes work correctly.
|
||
|
|
- The status bar indicator shows optimistically on penultimate pages even if the next chapter is already cached (false positive clears immediately after `loadSectionFile` check).
|
||
|
|
- Flash usage is at 99.6% -- monitor for future additions.
|