mirror of
https://github.com/YACReader/yacreader
synced 2025-07-14 02:54:46 -04:00
Updated the comic model for getting the reading comics properly sorted. //TODO This should be using the method in the DBHelper.
This commit is contained in:
@ -607,9 +607,11 @@ void ComicModel::setupReadingModelData(const QString &databasePath)
|
||||
QSqlQuery selectQuery(db);
|
||||
selectQuery.prepare("SELECT ci.number,ci.title,c.fileName,ci.numPages,c.id,c.parentId,c.path,ci.hash,ci.read,ci.isBis,ci.currentPage,ci.rating,ci.hasBeenOpened "
|
||||
"FROM comic c INNER JOIN comic_info ci ON (c.comicInfoId = ci.id) "
|
||||
"WHERE ci.hasBeenOpened = 1 AND ci.read = 0 AND ci.currentPage != ci.numPages AND ci.currentPage != 1");
|
||||
"WHERE ci.hasBeenOpened = 1 AND ci.read = 0 AND ci.currentPage != ci.numPages AND ci.currentPage != 1 "
|
||||
"ORDER BY ci.lastTimeOpened DESC");
|
||||
selectQuery.exec();
|
||||
setupModelData(selectQuery);
|
||||
|
||||
setupModelDataForList(selectQuery);
|
||||
}
|
||||
db.close();
|
||||
QSqlDatabase::removeDatabase(_databasePath);
|
||||
|
Reference in New Issue
Block a user