From d862c0879b1fe3dffaa2a993340dd42c216b31b4 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 3 Oct 2011 14:48:49 -0400 Subject: [PATCH] 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 --- js/ui/telepathyClient.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index 0ea3a7e9e..a0a58236f 100644 --- a/js/ui/telepathyClient.js +++ b/js/ui/telepathyClient.js @@ -539,9 +539,13 @@ ChatSource.prototype = { _updateAlias: function() { let oldAlias = this.title; - this.setTitle(this._contact.get_alias()); - this._notification.appendAliasChange(oldAlias, this.title); - this.pushNotification(this._notification); + let newAlias = this._contact.get_alias(); + + if (oldAlias == newAlias) + return; + + this.setTitle(newAlias); + this._notification.appendAliasChange(oldAlias, newAlias); }, createNotificationIcon: function() {