mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-08 16:36:25 +00:00
Fix conditions...
This commit is contained in:
parent
68114429c0
commit
357e17dfbc
@ -127,7 +127,7 @@ var checkNewMessages = function() {
|
|||||||
peerLabel = fn;
|
peerLabel = fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inArray(peerLabel, bufferedContacts)) {
|
if (!inArray(peerLabel, bufferedContacts)) {
|
||||||
$("li[peer-label='" + peerLabel + "']").remove();
|
$("li[peer-label='" + peerLabel + "']").remove();
|
||||||
peerListBuf = '<li peer-label="' + peerLabel + '"><div class="ocsms-plavatar"';
|
peerListBuf = '<li peer-label="' + peerLabel + '"><div class="ocsms-plavatar"';
|
||||||
if (typeof jsondata['photos'][peerLabel] != 'undefined') {
|
if (typeof jsondata['photos'][peerLabel] != 'undefined') {
|
||||||
@ -135,6 +135,7 @@ var checkNewMessages = function() {
|
|||||||
}
|
}
|
||||||
peerListBuf += '></div><a href="#" ng-click="loadConversation(' + idxVal2 + ');" mailbox-navigation="' +
|
peerListBuf += '></div><a href="#" ng-click="loadConversation(' + idxVal2 + ');" mailbox-navigation="' +
|
||||||
idxVal2 + '" style="font-weight: bold;" mailbox-label="' + peerLabel + '">' + peerLabel + ' (' + val + ')</a></li>';
|
idxVal2 + '" style="font-weight: bold;" mailbox-label="' + peerLabel + '">' + peerLabel + ' (' + val + ')</a></li>';
|
||||||
|
|
||||||
$('#app-mailbox-peers ul').prepend(peerListBuf);
|
$('#app-mailbox-peers ul').prepend(peerListBuf);
|
||||||
bufferedContacts.push(peerLabel);
|
bufferedContacts.push(peerLabel);
|
||||||
|
|
||||||
@ -330,7 +331,7 @@ function fetchInitialPeerList(jsondata) {
|
|||||||
fn = jsondata['contacts'][id];
|
fn = jsondata['contacts'][id];
|
||||||
peerLabel = fn;
|
peerLabel = fn;
|
||||||
}
|
}
|
||||||
if (inArray(peerLabel, bufferedContacts)) {
|
if (!inArray(peerLabel, bufferedContacts)) {
|
||||||
aScope.addContact({'label': peerLabel, 'nav': idxVal2, 'avatar': jsondata['photos'][peerLabel]});
|
aScope.addContact({'label': peerLabel, 'nav': idxVal2, 'avatar': jsondata['photos'][peerLabel]});
|
||||||
bufferedContacts.push(peerLabel);
|
bufferedContacts.push(peerLabel);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user