Commit 79770beb by Kim Peace

Merge branch 'develop' into debug/console_logs

parents a8e6659a 806d1193
......@@ -79,8 +79,10 @@ CHAT_SOCKET.handleMessage = function (
if (typeof ChatRoom !== "undefined") {
// 画像、動画の描画を待ってからスクロール
setTimeout(function () {
ChatRoom.scrollToBottom();
}, 300);
let jQueryMessages = $("#messages");
ChatRoom.waitForLoadingImage(jQueryMessages, ChatRoom.scrollToBottom);
ChatRoom.waitForLoadingVideo(jQueryMessages, ChatRoom.scrollToBottom);
}, 0);
} else {
Common.dismissLoadingIndicator();
}
......
......@@ -10,10 +10,10 @@ window.onscroll = function () {
return;
}
beforeScroll = window.scrollY;
ChatRoom.prependMessageWhenScrollIfNeeded();
ChatRoom.appendMessageWhenScrollIfNeeded();
};
ChatRoom.prependMessageWhenScrollIfNeeded = function () {
ChatRoom.appendMessageWhenScrollIfNeeded = function () {
const beforeHeight = $(".room_container").height();
messageCount = $(".chat_message").length;
if ($(this).scrollTop() === 0 && messageCount >= PagingSize.MESSAGE) {
......@@ -27,7 +27,7 @@ ChatRoom.prependMessageWhenScrollIfNeeded = function () {
}
ChatRoom.loadNewMessage().then((messages) => {
// prepend message
ChatRoom.prependMessage(messages);
ChatRoom.appendMessage(messages);
// hide loading indicator
if (typeof loader !== "undefined") {
loader.remove();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment