[polari/gnotification: 2/2] chatView: Withdraw notifications when the message read



commit a4e9d0f55890954fcb7d0560aabdd25ce6aaa438
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 then 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 7136be0..3186b3e 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -383,6 +383,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];
     },
 
@@ -583,7 +584,7 @@ const ChatView = new Lang.Class({
                                            this._room.channel.identifier,
                                            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]