telepathyClient: Check for a no-op before pushing an alias change message
tp-glib can sometimes emit a notify::alias signal when the alias doesn't actually change. Bail out early instead of pushing an alias change message. https://bugzilla.gnome.org/show_bug.cgi?id=660774
This commit is contained in:
parent
23a4d4c69e
commit
d862c0879b
@ -539,9 +539,13 @@ ChatSource.prototype = {
|
|||||||
|
|
||||||
_updateAlias: function() {
|
_updateAlias: function() {
|
||||||
let oldAlias = this.title;
|
let oldAlias = this.title;
|
||||||
this.setTitle(this._contact.get_alias());
|
let newAlias = this._contact.get_alias();
|
||||||
this._notification.appendAliasChange(oldAlias, this.title);
|
|
||||||
this.pushNotification(this._notification);
|
if (oldAlias == newAlias)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.setTitle(newAlias);
|
||||||
|
this._notification.appendAliasChange(oldAlias, newAlias);
|
||||||
},
|
},
|
||||||
|
|
||||||
createNotificationIcon: function() {
|
createNotificationIcon: function() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user