mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Make "delete" icon work properly in the "Reading" list
Only the "Favorites" special list was handled.
This commit is contained in:
@ -471,6 +471,22 @@ void DBHelper::deleteComicsFromFavorites(const QList<ComicDB> &comicsList, QSqlD
|
||||
db.commit();
|
||||
}
|
||||
|
||||
//a.k.a set comics as unread by reverting the conditions used to load the comics -> void ComicModel::setupReadingModelData(const QString &databasePath)
|
||||
void DBHelper::deleteComicsFromReading(const QList<ComicDB> &comicsList, QSqlDatabase &db)
|
||||
{
|
||||
db.transaction();
|
||||
|
||||
QLOG_DEBUG() << "deleteComicsFromReading----------------------------------";
|
||||
|
||||
for (auto comic : comicsList) {
|
||||
comic.info.hasBeenOpened = false;
|
||||
comic.info.currentPage = 0; //update sets hasBeenOpened to true if currentPage > 0;
|
||||
DBHelper::update(&comic.info, db);
|
||||
}
|
||||
|
||||
db.commit();
|
||||
}
|
||||
|
||||
void DBHelper::deleteComicsFromLabel(const QList<ComicDB> &comicsList, qulonglong labelId, QSqlDatabase &db)
|
||||
{
|
||||
db.transaction();
|
||||
|
Reference in New Issue
Block a user