mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-07 07:56:23 +00:00
Fix updating avatar menu element when new message is coming
This commit is contained in:
parent
0e92aa3779
commit
0dfa6152ab
@ -88,9 +88,8 @@ var checkNewMessages = function() {
|
||||
}
|
||||
|
||||
if ($.inArray(peerLabel, bufferedContacts) == -1) {
|
||||
$("div[mailbox-avatar='" + peerLabel + "']").remove();
|
||||
$("a[mailbox-label='" + peerLabel + "']").remove();
|
||||
peerListBuf = '<li><div class="ocsms-plavatar"';
|
||||
$("li[peer-label='" + peerLabel + "']").remove();
|
||||
peerListBuf = '<li peer-label="' + peerLabel + '"><div class="ocsms-plavatar"';
|
||||
if (typeof jsondata['photos'][peerLabel] != 'undefined') {
|
||||
peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"';
|
||||
}
|
||||
@ -294,7 +293,7 @@ function fetchInitialPeerList(jsondata) {
|
||||
peerLabel = fn;
|
||||
}
|
||||
if ($.inArray(peerLabel, bufferedContacts) == -1) {
|
||||
peerListBuf += '<li><div class="ocsms-plavatar"';
|
||||
peerListBuf += '<li peer-label="' + peerLabel + '"><div class="ocsms-plavatar"';
|
||||
if (typeof jsondata['photos'][peerLabel] != 'undefined') {
|
||||
peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user