feat: Add reading menu and delete cache function#433
feat: Add reading menu and delete cache function#433daveallie merged 8 commits intocrosspoint-reader:masterfrom
Conversation
|
This PR fixes #475 (and presumably also fixes #477… THANK YOU!), but also does other important stuff with broader UX implications. I hope @jonasdiemer won't mind that I've split his TOC/kosync bug fix code from here into a separate PR. |
…rify default kosync URL (#501) ## Summary * Fixes #475 * Fixes #477 * Closes #428 ## Additional Context * Updates to `src/activities/reader/EpubReaderChapterSelectionActivity.cpp` are copied verbatim from #433 (thanks to @jonasdiemer) * Update to `src/activities/settings/KOReaderSettingsActivity.cpp` per discussion with @itsthisjustin at #428 Tested on my device with several books and koreader sync turned on and off. --- ### AI Usage Did you use AI tools to help write this code? _NO_
daveallie
left a comment
There was a problem hiding this comment.
Keen to add this submenu, just needs a bit of a cleanup
The chapter selection is moved to the menu on pos 1.
7fe6dda to
f20cb10
Compare
daveallie
left a comment
There was a problem hiding this comment.
Actually a couple of things after playing with it:
- Let's keep the menus looking consistent for now, this PR introduces a new line height for the menu, let's make it look like the chapter select
- Now that this new menu screen is the first screen you land on when pressing confirm, I think we should title it the book's title (like we currently do for the chapter select screen), and then retitle the chapter select screen to "Chapter select"
|
Good catch, @daveallie - unified this (incl. the position of the Chapter selection title, which was slightly off). Maybe we should have global constants for title position, menu offsets, fonts, ... |
| @@ -419,9 +482,11 @@ void EpubReaderActivity::renderScreen() { | |||
| data[5] = (section->pageCount >> 8) & 0xFF; | |||
There was a problem hiding this comment.
section gets reset on line 287, so this crashes
There was a problem hiding this comment.
Sorry this slipped through (during rebase). Pushed a quick fix, but wondering if it would be better to re-initialize section.
- Update current branch from theme-engine-wiggum to custom-v16 - Document v16.0 base with merged PRs crosspoint-reader#442, crosspoint-reader#506, crosspoint-reader#433 - Add git workflow for syncing with upstream - Add code style patterns (house style, null-checks, settings) - Document pre-commit hook behavior - Remove outdated theme-specific content - Update repository structure (private fork, remotes, branches) - Clean up integrated PRs table
Critical learnings from v16.0 PR merges: - Settings serialization order must preserve backward compatibility - New settings always go at END of sequence - Document PR crosspoint-reader#506 and crosspoint-reader#433 fixes - Add working serial monitor command (cat vs pio device monitor)
daveallie
left a comment
There was a problem hiding this comment.
Looks good, I think in future we could also pass a few flags to clear cache to do things like keep / clear the progress
|
Hi @jonasdiemer, in version 0.15 I was working on what I call "Magic Key." The BACK button on the HOME screen functions as a wildcard, allowing you to define these types of functions to simplify debugging tasks or any frequent function with just hold Back button. I've been working with other functions and I need to double-check that everything is working correctly in 0.16 before making a PR, but its usefulness will depend on whether there are already integrated functions in the system to be able to. |
Hi @pablohc. Not sure if this is a question... I would probably prefer explicit "debug" functions in menus rather than a magic key (if you were asking for my opinion ;) ). |
## Summary * Adds a menu in the Epub reader * The Chapter selection is moved there to pos 1 (so it can be reached by double tapping the confirm button) * A Go Home is there, too * Most significantly, a function "Delete Book Cache" is added. This returns to main (to avoid directly rebuilding cached items, eg. if this is used to debug/develop other areas - and it's also easier ;)) Probably, the Sync function could now be moved from the Chapter selection to this menu, too. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
* master: feat: Debugging monitor script (crosspoint-reader#555) fix: truncating chapter titles using UTF-8 safe function (crosspoint-reader#599) fix: don't wake up after USB connect (crosspoint-reader#644) Revert "fix: don't wake up after USB connect" (crosspoint-reader#643) fix: custom sleep not showing image at index 0 (crosspoint-reader#639) docs: Update USER_GUIDE.md (crosspoint-reader#625) fix: Hide button hints in landscape CW mode (crosspoint-reader#637) fix: WiFi error screen text clarifications (crosspoint-reader#612) fix: don't wake up after USB connect (crosspoint-reader#576) feat(ui): change popup logic (crosspoint-reader#442) feat: Add reading menu and delete cache function (crosspoint-reader#433)
…rify default kosync URL (crosspoint-reader#501) ## Summary * Fixes crosspoint-reader#475 * Fixes crosspoint-reader#477 * Closes crosspoint-reader#428 ## Additional Context * Updates to `src/activities/reader/EpubReaderChapterSelectionActivity.cpp` are copied verbatim from crosspoint-reader#433 (thanks to @jonasdiemer) * Update to `src/activities/settings/KOReaderSettingsActivity.cpp` per discussion with @itsthisjustin at crosspoint-reader#428 Tested on my device with several books and koreader sync turned on and off. --- ### AI Usage Did you use AI tools to help write this code? _NO_
## Summary * Adds a menu in the Epub reader * The Chapter selection is moved there to pos 1 (so it can be reached by double tapping the confirm button) * A Go Home is there, too * Most significantly, a function "Delete Book Cache" is added. This returns to main (to avoid directly rebuilding cached items, eg. if this is used to debug/develop other areas - and it's also easier ;)) Probably, the Sync function could now be moved from the Chapter selection to this menu, too. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
## Summary * Adds a menu in the Epub reader * The Chapter selection is moved there to pos 1 (so it can be reached by double tapping the confirm button) * A Go Home is there, too * Most significantly, a function "Delete Book Cache" is added. This returns to main (to avoid directly rebuilding cached items, eg. if this is used to debug/develop other areas - and it's also easier ;)) Probably, the Sync function could now be moved from the Chapter selection to this menu, too. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
…rify default kosync URL (crosspoint-reader#501) ## Summary * Fixes crosspoint-reader#475 * Fixes crosspoint-reader#477 * Closes crosspoint-reader#428 ## Additional Context * Updates to `src/activities/reader/EpubReaderChapterSelectionActivity.cpp` are copied verbatim from crosspoint-reader#433 (thanks to @jonasdiemer) * Update to `src/activities/settings/KOReaderSettingsActivity.cpp` per discussion with @itsthisjustin at crosspoint-reader#428 Tested on my device with several books and koreader sync turned on and off. --- ### AI Usage Did you use AI tools to help write this code? _NO_
## Summary * Adds a menu in the Epub reader * The Chapter selection is moved there to pos 1 (so it can be reached by double tapping the confirm button) * A Go Home is there, too * Most significantly, a function "Delete Book Cache" is added. This returns to main (to avoid directly rebuilding cached items, eg. if this is used to debug/develop other areas - and it's also easier ;)) Probably, the Sync function could now be moved from the Chapter selection to this menu, too. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
Summary
Probably, the Sync function could now be moved from the Chapter selection to this menu, too.
AI Usage
While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it
helps set the right context for reviewers.
Did you use AI tools to help write this code? PARTIALLY