|
|
@@ -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
|
|