Files
Crosspoint/src/activities/home/RecentBooksActivity.h
T
Justin Mitchell 48aa3c8e02 Add SD theme system
Adds installable SD-card themes with manifest downloads, theme registry parsing, themed home/chrome/settings/file browser support, FreeInk layout integration, theme documentation, and layout tests.
2026-06-28 01:44:38 -04:00

40 lines
1.0 KiB
C++

#pragma once
#include <I18n.h>
#include <functional>
#include <string>
#include <vector>
#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<RecentBook> 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;
};