feat: allow removing book from recent list (#2045)
## Summary Add ability to long press 'confirm' on a book in the recent books list to be prompted to remove it from the list. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? *Yes, Claude* ---------
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <Xtc.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
namespace {
|
||||
constexpr uint8_t RECENT_BOOKS_FILE_VERSION = 3;
|
||||
@@ -64,8 +65,6 @@ bool RecentBooksStore::removeByPath(const std::string& path) {
|
||||
}
|
||||
recentBooks.erase(it);
|
||||
if (!saveToFile()) {
|
||||
// In-memory removal succeeded; persistence is best-effort here (consistent with
|
||||
// addBook/updateBook). Log the failure but still report the entry as removed.
|
||||
LOG_ERR("RBS", "Failed to persist removal of recent book: %s", path.c_str());
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user