From 2c12f3a5092568d2a731cf55ae446e45e592815a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 9 Apr 2015 18:44:50 +0200 Subject: [PATCH] telepathyClient: Fix removal of timestamp timeout source Timestamps were always handled by the notification rather than the source, so that code never worked. --- js/ui/components/telepathyClient.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js index 38b534782..1ad35423b 100644 --- a/js/ui/components/telepathyClient.js +++ b/js/ui/components/telepathyClient.js @@ -474,9 +474,6 @@ const ChatSource = new Lang.Class({ this._contact.disconnect(this._notifyAvatarId); this._contact.disconnect(this._presenceChangedId); - if (this._timestampTimeoutId) - Mainloop.source_remove(this._timestampTimeoutId); - this.parent(reason); }, @@ -604,6 +601,13 @@ const ChatNotification = new Lang.Class({ this._timestampTimeoutId = 0; }, + destroy: function(reason) { + if (this._timestampTimeoutId) + Mainloop.source_remove(this._timestampTimeoutId); + this._timestampTimeoutId = 0; + this.parent(reason); + }, + /** * appendMessage: * @message: An object with the properties: @@ -686,6 +690,7 @@ const ChatNotification = new Lang.Class({ // Reset the old message timeout if (this._timestampTimeoutId) Mainloop.source_remove(this._timestampTimeoutId); + this._timestampTimeoutId = 0; let message = { realMessage: props.group != 'meta', showTimestamp: false };