[gnome-shell/wip/fmuellner/fix-initial-details-visibility] appsMenu: Fix initial visibility of "Details" item



commit f8b8bd036b70a92c561f28d1c1c4af7e9265ceba
Author: Florian Müllner <fmuellner gnome org>
Date:   Sun Feb 24 02:21:56 2019 +0100

    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 f32e7f218..52970bc3f 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() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]