This commit is contained in:
Luis Ángel San Martín
2014-06-10 21:51:03 +02:00
2 changed files with 3 additions and 1 deletions

View File

@ -252,7 +252,8 @@ void DBHelper::update(ComicInfo * comicInfo, QSqlDatabase & db)
updateComicInfo.bindValue(":characters",comicInfo->characters);
updateComicInfo.bindValue(":notes",comicInfo->notes);
updateComicInfo.bindValue(":read", comicInfo->read?1:0);
bool read = comicInfo->read || comicInfo->currentPage == comicInfo->numPages.toInt(); //if current page is the las page, the comic is read(completed)
updateComicInfo.bindValue(":read", read?1:0);
updateComicInfo.bindValue(":id", comicInfo->id);
updateComicInfo.bindValue(":edited", comicInfo->edited?1:0);