feat: epub bookmarks (#1337)

Co-authored-by: vedi0boy <nate@origin8publishing.com>
Co-authored-by: Uri Tauber <uritaube@gmail.com>
This commit is contained in:
Nathanael Maher
2026-05-27 15:52:01 -04:00
committed by GitHub
co-authored by vedi0boy Uri Tauber
parent bbb3e06eb1
commit 36a3a0cc3a
26 changed files with 700 additions and 128 deletions
@@ -6,6 +6,7 @@
#include <optional>
#include "EpubReaderMenuActivity.h"
#include "ProgressMapper.h"
#include "activities/Activity.h"
class EpubReaderActivity final : public Activity {
@@ -31,9 +32,12 @@ class EpubReaderActivity final : public Activity {
bool pendingSyncSaveError = false;
bool skipNextButtonCheck = false; // Skip button processing for one frame after subactivity exit
bool automaticPageTurnActive = false;
bool showBookmarkMessage = false;
bool ignoreNextConfirmRelease = false;
// Tracks whether this book is currently removed from Recent Books by the
// removeReadBooksFromRecents feature (set at End-of-Book, cleared if paged back in).
bool recentsEntryRemoved = false;
unsigned long bookmarkMessageTime = 0UL;
// Set when the reader is left at end-of-book and SETTINGS.moveFinishedToReadFolder is on.
// Consumed in onExit() to relocate the finished book into /Read/.
bool pendingReadFolderMove = false;
@@ -59,6 +63,7 @@ class EpubReaderActivity final : public Activity {
void applyOrientation(uint8_t orientation);
void toggleAutoPageTurn(uint8_t selectedPageTurnOption);
void pageTurn(bool isForwardTurn);
void addBookmark();
// Footnote navigation
void navigateToHref(const std::string& href, bool savePosition = false);
@@ -73,4 +78,5 @@ class EpubReaderActivity final : public Activity {
void render(RenderLock&& lock) override;
bool isReaderActivity() const override { return true; }
ScreenshotInfo getScreenshotInfo() const override;
CrossPointPosition getCurrentPosition() const;
};