[Frontend] Add animation when new message arrives

This commit is contained in:
Rohan Sircar 2020-05-30 10:51:24 +05:30
parent 1abeac9f47
commit 3325c83500

View File

@ -82,6 +82,14 @@ export class ChatView implements Observer<ChatMessageViewModel> {
// if (cd.data.length > 0) { // if (cd.data.length > 0) {
// this._userModel.notify(); // this._userModel.notify();
// } // }
$(this._messageContainer)
.stop()
.animate(
{
scrollTop: $(this._messageContainer)[0].scrollHeight,
},
1500
);
} }
break; break;
case "page": case "page":