[gnome-shell] telepathyClient: Fix removal of timestamp timeout source
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] telepathyClient: Fix removal of timestamp timeout source
- Date: Fri, 10 Apr 2015 14:11:35 +0000 (UTC)
commit 2c12f3a5092568d2a731cf55ae446e45e592815a
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Apr 9 18:44:50 2015 +0200
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 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/components/telepathyClient.js b/js/ui/components/telepathyClient.js
index 38b5347..1ad3542 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 };
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]