telepathyClient: update the avatar correctly when it changes
Previously, when the avatar changed, we would not update the summary icon for the source at all and would only update the notification icon when the next message was received. Instead, we should update both immediately upon recieving the signal that the avatar has changed. https://bugzilla.gnome.org/show_bug.cgi?id=659768
This commit is contained in:
@ -543,13 +543,6 @@ ChatSource.prototype = {
|
||||
createNotificationIcon: function() {
|
||||
this._iconBox = new St.Bin({ style_class: 'avatar-box' });
|
||||
this._iconBox._size = this.ICON_SIZE;
|
||||
|
||||
this._updateAvatarIcon();
|
||||
|
||||
return this._iconBox;
|
||||
},
|
||||
|
||||
_updateAvatarIcon: function() {
|
||||
let textureCache = St.TextureCache.get_default();
|
||||
let file = this._contact.get_avatar_file();
|
||||
|
||||
@ -561,6 +554,13 @@ ChatSource.prototype = {
|
||||
icon_type: St.IconType.FULLCOLOR,
|
||||
icon_size: this._iconBox._size });
|
||||
}
|
||||
|
||||
return this._iconBox;
|
||||
},
|
||||
|
||||
_updateAvatarIcon: function() {
|
||||
this._setSummaryIcon(this.createNotificationIcon());
|
||||
this._notification.update(this._notification.title, null, { customContent: true, icon: this.createNotificationIcon() });
|
||||
},
|
||||
|
||||
open: function(notification) {
|
||||
|
Reference in New Issue
Block a user