Fixes issue with invalid number of conference participants displayed on the contact list indicator.
This commit is contained in:
parent
62a731e244
commit
3fc6da1ed5
|
@ -9,14 +9,16 @@ var notificationInterval;
|
||||||
* left(-1)
|
* left(-1)
|
||||||
*/
|
*/
|
||||||
function updateNumberOfParticipants(delta) {
|
function updateNumberOfParticipants(delta) {
|
||||||
//when the user is alone we don't show the number of participants
|
numberOfContacts += delta;
|
||||||
if(numberOfContacts === 0) {
|
if (numberOfContacts === 1) {
|
||||||
|
// when the user is alone we don't show the number of participants
|
||||||
$("#numberOfParticipants").text('');
|
$("#numberOfParticipants").text('');
|
||||||
numberOfContacts += delta;
|
ContactList.setVisualNotification(false);
|
||||||
} else if(numberOfContacts !== 0 && !ContactList.isVisible()) {
|
} else if (numberOfContacts > 1) {
|
||||||
ContactList.setVisualNotification(true);
|
ContactList.setVisualNotification(!ContactList.isVisible());
|
||||||
numberOfContacts += delta;
|
|
||||||
$("#numberOfParticipants").text(numberOfContacts);
|
$("#numberOfParticipants").text(numberOfContacts);
|
||||||
|
} else {
|
||||||
|
console.error("Invalid number of participants: " + numberOfContacts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue