drive-menu: Fix indicator visibility

Commit 519269be9d made the check for network mounts non-blocking, and
we now update the indicator's visibility before a newly-added network
mount is hidden.

Address this by monitoring the item itself for visibility changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/176>
This commit is contained in:
Florian Müllner
2021-07-13 11:40:31 +02:00
parent 94b907f46d
commit 3539ce1139
+2
View File
@@ -189,6 +189,8 @@ class DriveMenu extends PanelMenu.Button {
let item = new MountMenuItem(mount);
this._mounts.unshift(item);
this.menu.addMenuItem(item, 0);
item.connect('notify::visible', () => this._updateMenuVisibility());
}
_removeMount(mount) {