Browse Source

Fixes clearing message counter on opening the chat.

master
damencho 8 years ago
parent
commit
d8dd564b06
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      modules/UI/side_pannels/chat/Chat.js

+ 5
- 2
modules/UI/side_pannels/chat/Chat.js View File

172
         };
172
         };
173
         usermsg.autosize({callback: onTextAreaResize});
173
         usermsg.autosize({callback: onTextAreaResize});
174
 
174
 
175
-        $("#" + CHAT_CONTAINER_ID).bind("shown",
176
-            function () {
175
+        eventEmitter.on(UIEvents.SIDE_TOOLBAR_CONTAINER_TOGGLED,
176
+            function(containerId, isVisible) {
177
+                if (containerId !== CHAT_CONTAINER_ID || !isVisible)
178
+                    return;
179
+
177
                 unreadMessages = 0;
180
                 unreadMessages = 0;
178
                 updateVisualNotification();
181
                 updateVisualNotification();
179
             });
182
             });

Loading…
Cancel
Save