fix: prune books missing form sd card in recent books list (#1959)
This commit is contained in:
@@ -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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user