From 3fc6da1ed53b6a229bd6e9f28c97e5620b7ee392 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Mon, 6 Jul 2015 12:24:40 +0200 Subject: [PATCH] Fixes issue with invalid number of conference participants displayed on the contact list indicator. --- modules/UI/side_pannels/contactlist/ContactList.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/UI/side_pannels/contactlist/ContactList.js b/modules/UI/side_pannels/contactlist/ContactList.js index 551e106a4..00eb687d0 100644 --- a/modules/UI/side_pannels/contactlist/ContactList.js +++ b/modules/UI/side_pannels/contactlist/ContactList.js @@ -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); } }