mod: restore missing mod features from resync audit
Re-add KOReaderSyncActivity PUSH_ONLY mode (PR #1090): - SyncMode enum with INTERACTIVE/PUSH_ONLY, deferFinish pattern - Push & Sleep menu action in EpubReaderMenuActivity - ActivityManager::requestSleep() for activity-initiated sleep - main.cpp checks isSleepRequested() each loop iteration Wire EndOfBookMenuActivity into EpubReaderActivity: - pendingEndOfBookMenu deferred flag avoids render-lock deadlock - Handles all 6 actions: ARCHIVE, DELETE, TABLE_OF_CONTENTS, BACK_TO_BEGINNING, CLOSE_BOOK, CLOSE_MENU Add book management to reader menu: - ARCHIVE_BOOK, DELETE_BOOK, REINDEX_BOOK actions with handlers Port silent next-chapter pre-indexing: - silentIndexNextChapterIfNeeded() proactively indexes next chapter when user is near end of current one, eliminating load screens Add per-book letterbox fill toggle in reader menu: - LETTERBOX_FILL cycles Default/Dithered/Solid/None - Loads/saves per-book override via BookSettings - bookCachePath constructor param added to EpubReaderMenuActivity Made-with: Cursor
This commit is contained in:
61
chat-summaries/2026-03-07_20-00-summary.md
Normal file
61
chat-summaries/2026-03-07_20-00-summary.md
Normal file
@@ -0,0 +1,61 @@
|
||||
# Missing Mod Features Audit — Implementation
|
||||
|
||||
**Date**: 2026-03-07
|
||||
**Branch**: `mod/master-resync`
|
||||
|
||||
## Task
|
||||
|
||||
Comprehensive audit of `mod/master-resync` vs `mod/backup-pre-sync-2026-03-07` identified 4 mod features lost during the upstream resync. All 4 have been re-implemented.
|
||||
|
||||
## Changes
|
||||
|
||||
### 1. EndOfBookMenuActivity wired into EpubReaderActivity (HIGH)
|
||||
|
||||
**Files**: `EpubReaderActivity.h`, `EpubReaderActivity.cpp`
|
||||
|
||||
- Added `pendingEndOfBookMenu` and `endOfBookMenuOpened` flags
|
||||
- In `render()`: when reaching end-of-book, sets `pendingEndOfBookMenu = true` (deferred to avoid render-lock deadlock)
|
||||
- In `loop()`: checks flag and launches `EndOfBookMenuActivity` via `startActivityForResult`
|
||||
- Result handler covers all 6 actions: ARCHIVE (→ goHome), DELETE (→ goHome), TABLE_OF_CONTENTS (→ last chapter), BACK_TO_BEGINNING (→ spine 0), CLOSE_BOOK (→ goHome), CLOSE_MENU (→ stay at end)
|
||||
- Added `#include "EndOfBookMenuActivity.h"` and `#include "util/BookManager.h"`
|
||||
|
||||
### 2. Book management from reader menu (MEDIUM)
|
||||
|
||||
**Files**: `EpubReaderMenuActivity.h`, `EpubReaderMenuActivity.cpp`, `EpubReaderActivity.cpp`
|
||||
|
||||
- Added `ARCHIVE_BOOK`, `DELETE_BOOK`, `REINDEX_BOOK` to `MenuAction` enum
|
||||
- Added corresponding menu items between CLOSE_BOOK and DELETE_CACHE
|
||||
- Added handlers in `onReaderMenuConfirm`: each calls `BookManager::archiveBook/deleteBook/reindexBook` then `activityManager.goHome()`
|
||||
|
||||
### 3. Silent next-chapter pre-indexing (MEDIUM)
|
||||
|
||||
**Files**: `EpubReaderActivity.h`, `EpubReaderActivity.cpp`
|
||||
|
||||
- Added `preIndexedNextSpine` field and `silentIndexNextChapterIfNeeded()` method
|
||||
- Triggers when user is on second-to-last or last page of a chapter
|
||||
- Creates section file for `currentSpineIndex + 1` in advance
|
||||
- Called after every page turn in `loop()`
|
||||
- ~35 lines of self-contained implementation
|
||||
|
||||
### 4. Letterbox fill toggle in reader menu (LOW)
|
||||
|
||||
**Files**: `EpubReaderMenuActivity.h`, `EpubReaderMenuActivity.cpp`, `EpubReaderActivity.cpp`
|
||||
|
||||
- Added `LETTERBOX_FILL` to `MenuAction` enum
|
||||
- Added `bookCachePath` constructor parameter (with default `""` for backward compat)
|
||||
- Added per-book `pendingLetterboxFill`, `letterboxFillLabels`, `letterboxFillToIndex()`, `indexToLetterboxFill()`, `saveLetterboxFill()`
|
||||
- Cycles Default → Dithered → Solid → None → Default on Confirm
|
||||
- Renders current value on right edge of menu item
|
||||
- Loads/saves per-book setting via `BookSettings`
|
||||
- Updated call site in `EpubReaderActivity` to pass `epub->getCachePath()`
|
||||
|
||||
## Audit False Positives (confirmed NOT gaps)
|
||||
|
||||
- GfxRenderer kerning/ligatures/wrappedText — present on resync
|
||||
- HttpDownloader auth fallback — present with OPDS settings fallback
|
||||
- Lyra3CoversTheme — exists on resync
|
||||
- ActivityWithSubactivity → Activity migration — intentional upstream change
|
||||
- EndOfBookMenuActivity callbacks → setResult/finish — correctly migrated
|
||||
|
||||
## Follow-up Items
|
||||
- None
|
||||
Reference in New Issue
Block a user