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

This commit is contained in:
paweldomas 2015-07-06 12:24:40 +02:00
parent 62a731e244
commit 3fc6da1ed5
1 changed files with 8 additions and 6 deletions

View File

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