Merge branch 'feat-remove-from-recents' of https://github.com/jpirnay/crosspoint-reader into mybuild
This commit is contained in:
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user