Kaynağa Gözat

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

master
paweldomas 10 yıl önce
ebeveyn
işleme
3fc6da1ed5

+ 8
- 6
modules/UI/side_pannels/contactlist/ContactList.js Dosyayı Görüntüle

@@ -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…
İptal
Kaydet