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
This commit is contained in:
Florian Müllner 2019-02-24 02:21:56 +01:00 committed by Florian Müllner
parent 61471f9fb4
commit 572d54981e

View File

@ -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() {