瀏覽代碼

Fixes issue with invalid number of conference participants displayed on the contact list indicator.

master
paweldomas 10 年之前
父節點
當前提交
3fc6da1ed5
共有 1 個文件被更改,包括 8 次插入6 次删除
  1. 8
    6
      modules/UI/side_pannels/contactlist/ContactList.js

+ 8
- 6
modules/UI/side_pannels/contactlist/ContactList.js 查看文件

@@ -9,14 +9,16 @@ var notificationInterval;
9 9
  * left(-1)
10 10
  */
11 11
 function updateNumberOfParticipants(delta) {
12
-    //when the user is alone we don't show the number of participants
13
-    if(numberOfContacts === 0) {
12
+    numberOfContacts += delta;
13
+    if (numberOfContacts === 1) {
14
+        // when the user is alone we don't show the number of participants
14 15
         $("#numberOfParticipants").text('');
15
-        numberOfContacts += delta;
16
-    } else if(numberOfContacts !== 0 && !ContactList.isVisible()) {
17
-        ContactList.setVisualNotification(true);
18
-        numberOfContacts += delta;
16
+        ContactList.setVisualNotification(false);
17
+    } else if (numberOfContacts > 1) {
18
+        ContactList.setVisualNotification(!ContactList.isVisible());
19 19
         $("#numberOfParticipants").text(numberOfContacts);
20
+    } else {
21
+        console.error("Invalid number of participants: " + numberOfContacts);
20 22
     }
21 23
 }
22 24
 

Loading…
取消
儲存