#pragma once #include #include #include #include #include "RecentBooksStore.h" #include "activities/Activity.h" #include "util/ButtonNavigator.h" class RecentBooksActivity final : public Activity { private: ButtonNavigator buttonNavigator; size_t selectorIndex = 0; // Set when a long-press has fired; input is swallowed until Confirm is released // again so the release doesn't also open the book. bool longPressFired = false; // Recent tab state std::vector recentBooks; // Data loading void loadRecentBooks(); int getPageItems(); // Show an OK/Cancel prompt to remove the given book from the Recent Books list. void promptRemoveBook(const std::string& path, const std::string& title); public: explicit RecentBooksActivity(GfxRenderer& renderer, MappedInputManager& mappedInput) : Activity("RecentBooks", renderer, mappedInput) {} void onEnter() override; void onExit() override; void loop() override; void render(RenderLock&&) override; };