Xteink-X4-crosspoint-reader/src
Gaspar Fabrega Ragni 4dd73a211a
Some checks are pending
CI / build (push) Waiting to run
fix: custom sleep not showing image at index 0 (#639)
## Summary

* Fixing custom sleep behaviour where the first image in the /sleep
directory is not shown
* image at index 0 is not being rendered when more than 1 image is
stored in /sleep directory, because `APP_STATE.lastSleepImage` is always
0.

## Additional Context

* `APP_STATE.lastSleepImage` is reset to 0 when a epub is open, this
value is only used to compare it to the randomly selected one in
`renderCustomSleepScreen()` that should always be a valid index, since
the list of valid bmp images is colected from scratch. -> no need to
reset it and block image @ index 0 from being rendered

---

### 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**_

Co-authored-by: Oyster <Oyster@home>
2026-02-01 19:22:52 +11:00
..
activities fix: Hide button hints in landscape CW mode (#637) 2026-02-01 19:21:28 +11:00
images Move to SDK EInkDisplay and enable anti-aliased 2-bit text (#5) 2025-12-08 19:48:49 +11:00
network refactor: Re-work for OTA feature (#509) 2026-01-28 01:30:27 +11:00
util feat: invalidate cache on web uploads and opds downloads and add Clear Cache action (#393) 2026-01-22 00:06:07 +11:00
Battery.h Public release 2025-12-03 22:06:45 +11:00
CrossPointSettings.cpp feat: Add support to B&W filters to image covers (#476) 2026-01-28 00:21:59 +11:00
CrossPointSettings.h feat: Add support to B&W filters to image covers (#476) 2026-01-28 00:21:59 +11:00
CrossPointState.cpp Ensure new custom sleep image every time (#300) 2026-01-14 21:05:08 +11:00
CrossPointState.h Ensure new custom sleep image every time (#300) 2026-01-14 21:05:08 +11:00
fontIds.h feat: Include superscripts and subscripts in fonts (#463) 2026-01-21 22:42:41 +11:00
main.cpp fix: custom sleep not showing image at index 0 (#639) 2026-02-01 19:22:52 +11:00
MappedInputManager.cpp feat: add HalDisplay and HalGPIO (#522) 2026-01-28 04:50:15 +11:00
MappedInputManager.h feat: add HalDisplay and HalGPIO (#522) 2026-01-28 04:50:15 +11:00
RecentBooksStore.cpp feat: Display epub metadata on Recents (#511) 2026-01-28 04:25:42 +11:00
RecentBooksStore.h feat: Display epub metadata on Recents (#511) 2026-01-28 04:25:42 +11:00
ScreenComponents.cpp feat(ui): change popup logic (#442) 2026-02-01 18:41:24 +11:00
ScreenComponents.h feat(ui): change popup logic (#442) 2026-02-01 18:41:24 +11:00
WifiCredentialStore.cpp Add exFAT support (#150) 2025-12-30 16:09:30 +11:00
WifiCredentialStore.h Add connect to Wifi and File Manager Webserver (#41) 2025-12-20 01:05:43 +11:00