|
|
@ -190,6 +190,7 @@
|
|
|
|
numChats = chats.length,
|
|
|
|
numChats = chats.length,
|
|
|
|
x, userObj;
|
|
|
|
x, userObj;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (numChats > 0) {
|
|
|
|
for(x=0;x<numChats;x++) {
|
|
|
|
for(x=0;x<numChats;x++) {
|
|
|
|
userObj = chats[x];
|
|
|
|
userObj = chats[x];
|
|
|
|
chatEl.setAttribute('data-uid', userObj.uid);
|
|
|
|
chatEl.setAttribute('data-uid', userObj.uid);
|
|
|
@ -197,10 +198,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
chatsFrag.appendChild(chatEl.cloneNode(true));
|
|
|
|
chatsFrag.appendChild(chatEl.cloneNode(true));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
chatEl.innerHTML = '<a href="#">No Recent Chats</a>';
|
|
|
|
|
|
|
|
chatsFrag.appendChild(chatEl.cloneNode(true));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
chatsListEl.empty();
|
|
|
|
chatsListEl.empty();
|
|
|
|
chatsListEl.html(chatsFrag);
|
|
|
|
chatsListEl.html(chatsFrag);
|
|
|
|
// console.log('received chats: ', chats);
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|