From f92a4423301f43920c1d15b645540a001d5d747b Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 25 Jan 2020 10:58:50 +0200 Subject: [PATCH] Increase buffer size for active and scrolled down channels --- client/js/socket-events/msg.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/js/socket-events/msg.js b/client/js/socket-events/msg.js index a5ea7783..855ef2ad 100644 --- a/client/js/socket-events/msg.js +++ b/client/js/socket-events/msg.js @@ -75,8 +75,9 @@ socket.on("msg", function(data) { // If message arrives in non active channel, keep only 100 messages messageLimit = 100; } else if (channel.scrolledToBottom) { - // If message arrives in active channel, keep 500 messages if scroll is currently at the bottom - messageLimit = 500; + // If message arrives in active channel, keep 1500 messages if scroll is currently at the bottom + // One history load may load up to 1000 messages at once if condendesed or hidden events are enabled + messageLimit = 1500; } if (messageLimit > 0 && channel.messages.length > messageLimit) {