fix(app-database-service):do not start a transaction while setting app to favourites.

This commit is contained in:
JunjieBai 2024-03-11 13:49:28 +08:00 committed by iaom
parent 4a444ce661
commit 600ab2fce0
1 changed files with 3 additions and 0 deletions

View File

@ -791,6 +791,9 @@ bool AppDBManager::handleFavoritesStateUpdate(const QString &desktopFilePath, co
ApplicationInfoMap infos;
//更新favorites状态
if (!this->startTransaction()) {
return false;
}
cmd = QString("UPDATE APPINFO SET MODIFYED_TIME='%0', FAVORITES=%1 WHERE DESKTOP_FILE_PATH=:desktopFilePath")
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss"))
.arg(num);