过滤应用数据刷新信号

This commit is contained in:
hewenfei 2023-05-06 11:24:14 +08:00
parent b6da65c021
commit da6611ca65
1 changed files with 12 additions and 0 deletions

View File

@ -146,6 +146,9 @@ void AppDataWorker::onAppAdded(const QStringList &infos)
QList<DataEntity> apps;
appendApps(infos, apps);
if (apps.isEmpty()) {
return;
}
Q_EMIT appAdded(apps);
updateFavoriteApps();
@ -188,6 +191,9 @@ void AppDataWorker::onAppUpdated(const UkuiSearch::ApplicationInfoMap &infos)
QList<DataEntity> apps;
updateApps(infos, apps);
if (apps.isEmpty()) {
return;
}
Q_EMIT appUpdated(apps);
updateFavoriteApps();
@ -201,6 +207,9 @@ void AppDataWorker::onAppUpdatedAll(const QStringList &infos)
QList<DataEntity> apps;
updateAppsAll(infos, apps);
if (apps.isEmpty()) {
return;
}
Q_EMIT appUpdated(apps);
updateFavoriteApps();
@ -281,6 +290,9 @@ void AppDataWorker::onAppDeleted(QStringList infos)
}
QStringList removedIdList;
removeApps(infos, removedIdList);
if (removedIdList.isEmpty()) {
return;
}
Q_EMIT appDeleted(removedIdList);
updateFavoriteApps();