diff --git a/js/ui/userMenu.js b/js/ui/userMenu.js index 7e4fbe30c..c3e4e4fd7 100644 --- a/js/ui/userMenu.js +++ b/js/ui/userMenu.js @@ -309,7 +309,9 @@ IMStatusChooserItem.prototype = { this._setComboboxPresence(presence); if (!this._sessionPresenceRestored) { - this._sessionStatusChanged(this._presence.status); + this._presence.connectSignal('StatusChanged', Lang.bind(this, function (proxy, senderName, [status]) { + this._sessionStatusChanged(status); + })); return; } @@ -469,6 +471,10 @@ UserMenuButton.prototype = { this._idleIcon = new St.Icon({ icon_name: 'user-idle', style_class: 'popup-menu-icon' }); + this._presence.connectSignal('StatusChanged', Lang.bind(this, function (proxy, senderName, [status]) { + this._updateSwitch(status); + })); + this._accountMgr.connect('most-available-presence-changed', Lang.bind(this, this._updatePresenceIcon)); this._accountMgr.prepare_async(null, Lang.bind(this,