From da6611ca6596d7520a8cf61da3ce15e57feebb21 Mon Sep 17 00:00:00 2001 From: hewenfei Date: Sat, 6 May 2023 11:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=87=E6=BB=A4=E5=BA=94=E7=94=A8=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=88=B7=E6=96=B0=E4=BF=A1=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/appdata/app-data-manager.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/appdata/app-data-manager.cpp b/src/appdata/app-data-manager.cpp index ac763b4..e1d2c98 100644 --- a/src/appdata/app-data-manager.cpp +++ b/src/appdata/app-data-manager.cpp @@ -146,6 +146,9 @@ void AppDataWorker::onAppAdded(const QStringList &infos) QList 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 apps; updateApps(infos, apps); + if (apps.isEmpty()) { + return; + } Q_EMIT appUpdated(apps); updateFavoriteApps(); @@ -201,6 +207,9 @@ void AppDataWorker::onAppUpdatedAll(const QStringList &infos) QList 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();