[gnome-shell/wip/fmuellner/duplicate-favs: 105/105] appFavorites: Don't add app explicitly
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/duplicate-favs: 105/105] appFavorites: Don't add app explicitly
- Date: Mon, 8 Oct 2018 16:22:21 +0000 (UTC)
commit 501a1aff6846f8b6f8efef0a13bd527e568af425
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Aug 12 02:17:42 2018 +0200
appFavorites: Don't add app explicitly
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
js/ui/appFavorites.js | 1 -
1 file changed, 1 deletion(-)
---
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;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]