mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Added support for knowing if a comic is in favorites or not.
This commit is contained in:
@ -1062,3 +1062,18 @@ QList<QString> DBHelper::loadSubfoldersNames(qulonglong folderId, QSqlDatabase &
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool DBHelper::isFavoriteComic(qulonglong id, QSqlDatabase &db)
|
||||
{
|
||||
QSqlQuery selectQuery(db);
|
||||
selectQuery.prepare("SELECT * FROM comic_default_reading_list cl WHERE cl.comic_id = :comic_id AND cl.default_reading_list_id = 1");
|
||||
selectQuery.bindValue(":comic_id", id);
|
||||
selectQuery.exec();
|
||||
|
||||
if(selectQuery.next())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user