feat: add long-press Confirm for book management in file browser and recents

Long-pressing Confirm on a book file in MyLibraryActivity or
RecentBooksActivity opens the BookManageMenuActivity popup with
Archive/Delete/Delete Cache/Reindex options. Actions are executed
via BookManager and the file list is refreshed afterward.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cottongin
2026-02-21 02:57:19 -05:00
parent 49471e36f1
commit 390f10f30d
4 changed files with 134 additions and 0 deletions

View File

@@ -18,12 +18,17 @@ class RecentBooksActivity final : public ActivityWithSubactivity {
// Recent tab state
std::vector<RecentBook> recentBooks;
// Long-press state
bool ignoreNextConfirmRelease = false;
static constexpr unsigned long LONG_PRESS_MS = 700;
// Callbacks
const std::function<void(const std::string& path)> onSelectBook;
const std::function<void()> onGoHome;
// Data loading
void loadRecentBooks();
void openManageMenu(const std::string& bookPath);
public:
explicit RecentBooksActivity(GfxRenderer& renderer, MappedInputManager& mappedInput,