NetworkMenu: defer calling syncSectionTitle until after pushing the device

syncSectionTitle looks at device list for the section, to understand if
the section should be visible or not, so obviously it needs to see the
new device.

I wonder when this broke.

https://bugzilla.gnome.org/show_bug.cgi?id=692749
This commit is contained in:
Giovanni Campagna 2013-01-29 00:23:31 +01:00
parent 4545719e18
commit b3f29b46cf

View File

@ -1934,10 +1934,10 @@ const NMApplet = new Lang.Class({
section.addMenuItem(wrapper.statusItem); section.addMenuItem(wrapper.statusItem);
section.addMenuItem(wrapper.section); section.addMenuItem(wrapper.section);
this._syncSectionTitle(wrapper.category);
let devices = this._devices[wrapper.category].devices; let devices = this._devices[wrapper.category].devices;
devices.push(wrapper); devices.push(wrapper);
this._syncSectionTitle(wrapper.category);
}, },
_deviceRemoved: function(client, device) { _deviceRemoved: function(client, device) {