@@ -58,36 +58,21 @@ QStringList LauncherBackend::storedApplications() const
5858
5959void LauncherBackend::setStoredApplications(const QStringList &appIds)
6060{
61− // Are we dropping any pinned apps?
62− auto needToSync = false;
61+ // Record all existing pinned apps, so we can notice them in new list
6362 auto pinnedItems = QStringList();
6463 for (LauncherBackendItem &app: m_storedApps) {
6564 if (app.pinned) {
66− auto found = false;
67− for (const QString &appId: appIds) {
68− auto fullAppId = desktopFile(appId);
69− if (app.settings->fileName() == fullAppId) {
70− found = true;
71− break;
72− }
73− }
74− if (!found) {
75− needToSync = true;
76− }
7765 pinnedItems.append(app.settings->fileName());
7866 }
7967 }
8068
8169 clearItems();
8270
83−
8471 for (const QString &appId: appIds) {
8572 loadDesktopFile(appId, pinnedItems.contains(desktopFile(appId)));
8673 }
8774
88− if (needToSync) {
89− syncToAccounts();
90− }
75+ syncToAccounts();
9176}
9277
9378QString LauncherBackend::desktopFile(const QString &appId) const