From 357e17dfbce5e6807e6f7341cbe3cd731a984762 Mon Sep 17 00:00:00 2001 From: Loic Blot Date: Mon, 8 Jun 2015 19:39:28 +0000 Subject: [PATCH] Fix conditions... --- js/public/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/public/app.js b/js/public/app.js index 3ce3aca..766a219 100644 --- a/js/public/app.js +++ b/js/public/app.js @@ -127,7 +127,7 @@ var checkNewMessages = function() { peerLabel = fn; } - if (inArray(peerLabel, bufferedContacts)) { + if (!inArray(peerLabel, bufferedContacts)) { $("li[peer-label='" + peerLabel + "']").remove(); peerListBuf = '
  • ' + peerLabel + ' (' + val + ')
  • '; + $('#app-mailbox-peers ul').prepend(peerListBuf); bufferedContacts.push(peerLabel); @@ -330,7 +331,7 @@ function fetchInitialPeerList(jsondata) { fn = jsondata['contacts'][id]; peerLabel = fn; } - if (inArray(peerLabel, bufferedContacts)) { + if (!inArray(peerLabel, bufferedContacts)) { aScope.addContact({'label': peerLabel, 'nav': idxVal2, 'avatar': jsondata['photos'][peerLabel]}); bufferedContacts.push(peerLabel); }