Use previous button for removal of active entry in recent books

This commit is contained in:
jpirnay
2026-03-23 21:16:49 +01:00
parent eadcead501
commit 5d8486ea07
3 changed files with 42 additions and 15 deletions
+9
View File
@@ -40,6 +40,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& coverBmpPath) {
auto it =