mirror of
https://github.com/nerzhul/ocsms.git
synced 2025-06-08 16:36:25 +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) {
|
if ($.inArray(peerLabel, bufferedContacts) == -1) {
|
||||||
$("div[mailbox-avatar='" + peerLabel + "']").remove();
|
$("li[peer-label='" + peerLabel + "']").remove();
|
||||||
$("a[mailbox-label='" + peerLabel + "']").remove();
|
peerListBuf = '<li peer-label="' + peerLabel + '"><div class="ocsms-plavatar"';
|
||||||
peerListBuf = '<li><div class="ocsms-plavatar"';
|
|
||||||
if (typeof jsondata['photos'][peerLabel] != 'undefined') {
|
if (typeof jsondata['photos'][peerLabel] != 'undefined') {
|
||||||
peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"';
|
peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"';
|
||||||
}
|
}
|
||||||
@ -294,7 +293,7 @@ function fetchInitialPeerList(jsondata) {
|
|||||||
peerLabel = fn;
|
peerLabel = fn;
|
||||||
}
|
}
|
||||||
if ($.inArray(peerLabel, bufferedContacts) == -1) {
|
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') {
|
if (typeof jsondata['photos'][peerLabel] != 'undefined') {
|
||||||
peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"';
|
peerListBuf += 'style="background-image: url(' + jsondata['photos'][peerLabel] + ');"';
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user