telepathyClient: Fix removal of timestamp timeout source

Timestamps were always handled by the notification rather than the source,
so that code never worked.
This commit is contained in:
Florian Müllner 2015-04-09 18:44:50 +02:00
parent 0141a2be9e
commit 2c12f3a509

View File

@ -474,9 +474,6 @@ const ChatSource = new Lang.Class({
this._contact.disconnect(this._notifyAvatarId); this._contact.disconnect(this._notifyAvatarId);
this._contact.disconnect(this._presenceChangedId); this._contact.disconnect(this._presenceChangedId);
if (this._timestampTimeoutId)
Mainloop.source_remove(this._timestampTimeoutId);
this.parent(reason); this.parent(reason);
}, },
@ -604,6 +601,13 @@ const ChatNotification = new Lang.Class({
this._timestampTimeoutId = 0; this._timestampTimeoutId = 0;
}, },
destroy: function(reason) {
if (this._timestampTimeoutId)
Mainloop.source_remove(this._timestampTimeoutId);
this._timestampTimeoutId = 0;
this.parent(reason);
},
/** /**
* appendMessage: * appendMessage:
* @message: An object with the properties: * @message: An object with the properties:
@ -686,6 +690,7 @@ const ChatNotification = new Lang.Class({
// Reset the old message timeout // Reset the old message timeout
if (this._timestampTimeoutId) if (this._timestampTimeoutId)
Mainloop.source_remove(this._timestampTimeoutId); Mainloop.source_remove(this._timestampTimeoutId);
this._timestampTimeoutId = 0;
let message = { realMessage: props.group != 'meta', let message = { realMessage: props.group != 'meta',
showTimestamp: false }; showTimestamp: false };