fix: desktop file still in Desktop after uninstall
AM will emit a signal which named UninstallSuccess when we click launcher to uninstall the app of linglong. Then launcher request item data after listen this signal and it will call AM to refresh the data map. This make AM think the desktop item has been removed when the fs notify event arrive, which cause AM won't remove the desktop file. So we just do removeDesktop() before emit the signal. Log:
This commit is contained in:
parent
9bd2a121b0
commit
9b82262a4e
@ -555,6 +555,7 @@ void Launcher::onCheckDesktopFile(const QString &filePath, int type)
|
||||
// remove item
|
||||
const Item &item = itemsMap[filePath];
|
||||
removeDesktop(filePath);
|
||||
|
||||
emitItemChanged(&item, appStatusDeleted);
|
||||
}
|
||||
}
|
||||
@ -983,6 +984,8 @@ void Launcher::doUninstall(DesktopInfo &info, const Item &item)
|
||||
return;
|
||||
}
|
||||
|
||||
removeDesktop(item.info.path);
|
||||
|
||||
Q_EMIT uninstallSuccess(item.info.path);
|
||||
|
||||
// 浮窗通知
|
||||
|
Loading…
Reference in New Issue
Block a user