mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -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:
parent
e2a8d520a9
commit
30982be0a9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user