fix: prune books missing form sd card in recent books list (#1959)

This commit is contained in:
KemoNine
2026-05-16 22:03:49 +03:00
committed by GitHub
parent a3e51f9b1e
commit 93e81daf41
4 changed files with 26 additions and 14 deletions
+7
View File
@@ -37,6 +37,13 @@ class RecentBooksStore {
void updateBook(const std::string& path, const std::string& title, const std::string& author,
const std::string& coverBmpPath);
// True if the book's backing file is no longer present on the SD card.
static bool isMissing(const RecentBook& book);
// Remove entries whose backing file is no longer on the SD card.
// Returns true if any entry was removed. Does not persist — caller decides.
bool pruneMissing();
// Get the list of recent books (most recent first)
const std::vector<RecentBook>& getBooks() const { return recentBooks; }