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



commit 572d54981ed47e1ddd3eae786d725ee26c3756c4
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 2e2a6592d..1d9621ae3 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]