1
0
mirror of https://github.com/nerzhul/ocsms.git synced 2025-06-07 07:56:23 +00:00

Only modify dom and scroll if there any new message

This commit is contained in:
Loïc Blot (@U-Exp) 2014-09-26 20:04:29 +02:00
parent e89c8b6d0f
commit fdb5d4845a

View File

@ -33,8 +33,10 @@ var refreshConversation = function() {
},
function(jsondata, status) {
conversationBuf = formatConversation(jsondata);
$('.msg-endtag').before(conversationBuf);
$('#app-content').scrollTop(1E10);
if (conversationBuf != '') {
$('.msg-endtag').before(conversationBuf);
$('#app-content').scrollTop(1E10);
}
}
);
};