[polari] roomList: Clear pending messages indication when offline



commit e0b1aafddbb9fd3bfedd2878305686491c7ea742
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Aug 8 17:12:32 2015 +0200

    roomList: Clear pending messages indication when offline
    
    We currently update the indication for unread or highlighted messages
    as the number of pending messages changes. However this obviously
    does not work while offline, while at the same time keeping the
    highlight around is obviously unobvious to users. The best thing
    we can do while offline is clearing out the indication when a room
    is selected, so do that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753050

 src/roomList.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/roomList.js b/src/roomList.js
index 558d346..e6d276b 100644
--- a/src/roomList.js
+++ b/src/roomList.js
@@ -45,6 +45,11 @@ const RoomRow = new Lang.Class({
         this._updatePending();
     },
 
+    selected: function() {
+        if (!this.widget.room.channel)
+            this._updatePending();
+    },
+
     _updatePending: function() {
         let room = this.widget.room;
 
@@ -279,6 +284,8 @@ const RoomList = new Lang.Class({
 
     _onRowSelected: function(w, row) {
         this._roomManager.setActiveRoom(row ? row.room : null);
+        if (row)
+            this._roomRows[row.room.id].selected();
     },
 
     _updateHeader: function(row, before) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]