userMenu: Don't update the presence icon immediately
If we don't freeze the presence icon, we can end up in a place where we'll be updating the icon before we fade out the panel indicators when coming back from the lock screen. https://bugzilla.gnome.org/show_bug.cgi?id=683156
This commit is contained in:
@ -574,6 +574,8 @@ const UserMenuButton = new Lang.Class({
|
||||
|
||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||
this._sessionUpdated();
|
||||
|
||||
this.connect('thawed', Lang.bind(this, this._onThawed));
|
||||
},
|
||||
|
||||
_sessionUpdated: function() {
|
||||
@ -666,6 +668,9 @@ const UserMenuButton = new Lang.Class({
|
||||
},
|
||||
|
||||
_updatePresenceIcon: function(accountMgr, presence, status, message) {
|
||||
if (this.frozen)
|
||||
return;
|
||||
|
||||
if (Main.sessionMode.isLocked)
|
||||
this._iconBox.child = this._lockedIcon;
|
||||
else if (presence == Tp.ConnectionPresenceType.AVAILABLE)
|
||||
@ -798,6 +803,10 @@ const UserMenuButton = new Lang.Class({
|
||||
this._presence.status = status;
|
||||
},
|
||||
|
||||
_onThawed: function() {
|
||||
this._updatePresenceIcon();
|
||||
},
|
||||
|
||||
_onMyAccountActivate: function() {
|
||||
Main.overview.hide();
|
||||
let app = Shell.AppSystem.get_default().lookup_setting('gnome-user-accounts-panel.desktop');
|
||||
|
Reference in New Issue
Block a user