summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2018-08-12 02:17:42 +0200
committerFlorian Müllner <florian.muellner@gmail.com>2018-10-08 16:22:04 +0000
commit501a1aff6846f8b6f8efef0a13bd527e568af425 (patch)
treedf3d682e7ab73215c20d67da70f121c3a2d32c89
parent586a9ff9cdf044bc7555bfeba36e561470a9eaef (diff)
downloadgnome-shell-wip/fmuellner/duplicate-favs.tar.gz
appFavorites: Don't add app explicitlywip/fmuellner/duplicate-favs
When adding a favorite, we add the ID to the list of favorites, save the setting and add the new app to the favorites map. However as writing the settings value already results in reload() to update the favorites map, the new app is usually already in the map when we add it. The only exception is when the ID was found in the RENAMED_DESKTOP_IDS map, in which case we end up adding both the renamed app and the original one. Fix this by simply relying on reload() to properly update the map, just like we already do in _removeFavorite(). https://gitlab.gnome.org/GNOME/gnome-shell/issues/471
-rw-r--r--js/ui/appFavorites.js1
1 files changed, 0 insertions, 1 deletions
diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js
index 8d074cffa..9de707047 100644
--- a/js/ui/appFavorites.js
+++ b/js/ui/appFavorites.js
@@ -128,7 +128,6 @@ var AppFavorites = new Lang.Class({
else
ids.splice(pos, 0, appId);
global.settings.set_strv(this.FAVORITE_APPS_KEY, ids);
- this._favorites[appId] = app;
return true;
},