fix: Scrolling page items calculation#716
fix: Scrolling page items calculation#716daveallie merged 2 commits intocrosspoint-reader:masterfrom
Conversation
There was a problem hiding this comment.
No code review, but tested on device and seems to fix the bugs with the file selectors (on both original and Lyra UIs).
Thank you!
This PR may get merged first as a bug fix, but since there may still be some weirdness in other page scrolls, I hope we may eventually get something like #600
70688b7 to
ec103eb
Compare
src/activities/home/HomeActivity.cpp
Outdated
| menuItems.insert(menuItems.begin() + 2, "OPDS Browser"); | ||
| } | ||
|
|
||
| Serial.printf("Home menu items count: %d\n", static_cast<int>(menuItems.size())); |
There was a problem hiding this comment.
nit: Can we remove or follow the standard logging format?
src/components/UITheme.h
Outdated
| inline int min(const int a, const int b) { return a < b ? a : b; } | ||
| inline int max(const int a, const int b) { return a > b ? a : b; } |
There was a problem hiding this comment.
Remove these and just use std::min and std::max instead.
There was a problem hiding this comment.
Ah thanks! that was the missing piece
ec103eb to
a98fe67
Compare
|
@lukestein this is ready for the next RC |
lukestein
left a comment
There was a problem hiding this comment.
Re-tested on device (as usual, no code review from me) and continues to fix the bugs with the file selectors (on both original and Lyra UIs).
I'll leave this one for @daveallie et al to merge.
## Summary Fix for the page skip issue detected #700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
## Summary Fix for the page skip issue detected crosspoint-reader#700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
## Summary Fix for the page skip issue detected crosspoint-reader#700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
## Summary Fix for the page skip issue detected crosspoint-reader#700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
…king-space * master: feat: Add percentage support to CSS properties (crosspoint-reader#738) Use GITHUB_REF_NAME over GITHUB_HEAD_REF in release candidate workflow Add release candidate workflow fix: Allow OTA update from RC build to full release (crosspoint-reader#778) fix(ui): Add Back label in KOReader Sync screen (crosspoint-reader#770) fix: Add EPUB 3 cover image detection (crosspoint-reader#760) feat: A web editor for settings (crosspoint-reader#667) feat: add HalStorage (crosspoint-reader#656) perf: optimize drawPixel() (crosspoint-reader#748) feat: wakeup target detection (crosspoint-reader#731) fix: Scrolling page items calculation (crosspoint-reader#716) refactor: Rename "Embedded Style" to "Book's Embedded Style" (crosspoint-reader#746) feat: optimize fillRectDither (crosspoint-reader#737)
## Summary Fix for the page skip issue detected crosspoint-reader#700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
## Summary Fix for the page skip issue detected crosspoint-reader#700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
…king-space * master: feat: use natural sort in file browser (crosspoint-reader#722) fix: issue if book href are absolute url and not relative to server (crosspoint-reader#741) feat: unify navigation handling with system-wide continuous navigation (crosspoint-reader#600) feat: Add Italian hyphenation support (crosspoint-reader#584) feat: Add percentage support to CSS properties (crosspoint-reader#738) Use GITHUB_REF_NAME over GITHUB_HEAD_REF in release candidate workflow Move release candidate workflow to manual dispatch fix: Allow OTA update from RC build to full release (crosspoint-reader#778) refactor: Rename "Embedded Style" to "Book's Embedded Style" (crosspoint-reader#746) perf: optimize drawPixel() (crosspoint-reader#748) feat: wakeup target detection (crosspoint-reader#731) fix: Scrolling page items calculation (crosspoint-reader#716) feat: optimize fillRectDither (crosspoint-reader#737) fix: increase lyra sideButtonHintsWidth to 30 (crosspoint-reader#727) fix: Remove separations after style changes (crosspoint-reader#720) fix: Lag before displaying covers on home screen (crosspoint-reader#721) feat: Add Settings for toggling CSS on or off (crosspoint-reader#717) Use GITHUB_HEAD_REF release: 1.0.0
* master: (25 commits) fix: Reduce MIN_SIZE_FOR_POPUP to 10KB (crosspoint-reader#809) docs: Update USER_GUIDE.md (crosspoint-reader#817) fix: Prevent sleeping when in OPDS browser / downloading books (crosspoint-reader#818) feat: Extend python debugging monitor functionality (keyword filter / suppress) (crosspoint-reader#810) docs: Update USER_GUIDE.md (crosspoint-reader#808) feat: Connect to last wifi by default (crosspoint-reader#752) feat: use natural sort in file browser (crosspoint-reader#722) fix: issue if book href are absolute url and not relative to server (crosspoint-reader#741) feat: unify navigation handling with system-wide continuous navigation (crosspoint-reader#600) feat: Add Italian hyphenation support (crosspoint-reader#584) feat: Add percentage support to CSS properties (crosspoint-reader#738) Use GITHUB_REF_NAME over GITHUB_HEAD_REF in release candidate workflow Move release candidate workflow to manual dispatch fix: Allow OTA update from RC build to full release (crosspoint-reader#778) refactor: Rename "Embedded Style" to "Book's Embedded Style" (crosspoint-reader#746) perf: optimize drawPixel() (crosspoint-reader#748) feat: wakeup target detection (crosspoint-reader#731) fix: Scrolling page items calculation (crosspoint-reader#716) feat: optimize fillRectDither (crosspoint-reader#737) fix: increase lyra sideButtonHintsWidth to 30 (crosspoint-reader#727) ...
## Summary Fix for the page skip issue detected crosspoint-reader#700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
## Summary Fix for the page skip issue detected crosspoint-reader#700 (comment) by user @whyte-j Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way. ## Additional Context The calculation was outdated after several changes were added afterwards --- ### 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? _**NO**_
Summary
Fix for the page skip issue detected #700 (comment) by user @whyte-j
Skipping down on the last page now skips to the last item, and up on the first page to the first item, rather than wrapping around the list in a weird way.
Additional Context
The calculation was outdated after several changes were added afterwards
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? NO