소스 검색

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…
취소
저장