#pragma once #include #include #include #include "../Activity.h" #include "RecentBooksStore.h" #include "util/ButtonNavigator.h" class RecentBooksActivity final : public Activity { private: ButtonNavigator buttonNavigator; size_t selectorIndex = 0; // Recent tab state std::vector recentBooks; // Callbacks const std::function onSelectBook; const std::function onGoHome; // Data loading void loadRecentBooks(); public: explicit RecentBooksActivity(GfxRenderer& renderer, MappedInputManager& mappedInput, const std::function& onGoHome, const std::function& onSelectBook) : Activity("RecentBooks", renderer, mappedInput), onSelectBook(onSelectBook), onGoHome(onGoHome) {} void onEnter() override; void onExit() override; void loop() override; void render(Activity::RenderLock&&) override; };