This commit is contained in:
Timothy J. Baek 2024-09-24 01:05:46 +02:00
parent ad82eae6a9
commit 398bc96b1a

View File

@ -39,8 +39,15 @@
let messagesLoading = false; let messagesLoading = false;
const loadMoreMessages = async () => { const loadMoreMessages = async () => {
// scroll slightly down to disable continuous loading
const element = document.getElementById('messages-container');
element.scrollTop = element.scrollTop + 100;
messagesLoading = true; messagesLoading = true;
messagesCount += 20; messagesCount += 20;
await tick();
messagesLoading = false; messagesLoading = false;
}; };