[polari] chatView: Withdraw notifications when the message read
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatView: Withdraw notifications when the message read
- Date: Fri, 21 Mar 2014 19:24:25 +0000 (UTC)
commit d7105ea2eb9793bb7a8e42a58c0f3d308b29e6a7
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Nov 8 04:07:00 2013 +0100
chatView: Withdraw notifications when the message read
The new notifications are quite a bit more persistent than the old
ones, so to avoid piling up old notifications, withdraw them once
the corresponding message has been read.
src/chatView.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index df649f3..fd3e3b2 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -382,6 +382,7 @@ const ChatView = new Lang.Class({
let [id,] = message.get_pending_message_id();
if (this._pending[id])
this._view.buffer.delete_mark(this._pending[id]);
+ this._app.withdraw_notification('pending-message-' + id);
delete this._pending[id];
},
@@ -649,7 +650,7 @@ const ChatView = new Lang.Class({
this._room.channel_name,
TP_CURRENT_TIME ]);
notification.set_default_action_and_target('app.join-room', param);
- this._app.send_notification(null, notification);
+ this._app.send_notification('pending-message-' + id, notification);
}
let buffer = this._view.get_buffer();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]