From 572d54981ed47e1ddd3eae786d725ee26c3756c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 24 Feb 2019 02:21:56 +0100 Subject: [PATCH] appsMenu: Fix initial visibility of "Details" item It is only supposed to be visible when Software is installed, but we currently only update the visibility on changes. https://gitlab.gnome.org/GNOME/gnome-shell/issues/989 --- js/ui/panel.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/ui/panel.js b/js/ui/panel.js index 2e2a6592d4..1d9621ae38 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -110,9 +110,14 @@ class AppMenu extends PopupMenu.PopupMenu { }); this._appSystem.connect('installed-changed', () => { - let sw = this._appSystem.lookup_app('org.gnome.Software.desktop'); - this._detailsItem.actor.visible = (sw != null); + this._updateDetailsVisibility(); }); + this._updateDetailsVisibility(); + } + + _updateDetailsVisibility() { + let sw = this._appSystem.lookup_app('org.gnome.Software.desktop'); + this._detailsItem.actor.visible = (sw != null); } isEmpty() { -- GitLab