Merge branch 'feat-remove-from-recents' of https://github.com/jpirnay/crosspoint-reader into mybuild

This commit is contained in:
jpirnay
2026-03-23 21:20:27 +01:00
3 changed files with 40 additions and 15 deletions
+9
View File
@@ -46,6 +46,15 @@ void RecentBooksStore::addBook(const std::string& path, const std::string& title
saveToFile();
}
void RecentBooksStore::removeBook(const std::string& path) {
auto it =
std::find_if(recentBooks.begin(), recentBooks.end(), [&](const RecentBook& book) { return book.path == path; });
if (it != recentBooks.end()) {
recentBooks.erase(it);
saveToFile();
}
}
void RecentBooksStore::updateBook(const std::string& path, const std::string& title, const std::string& author,
const std::string& series, const std::string& coverBmpPath) {
auto it =