From 739d44b561b47bb2b6ddd1f552caa8f23b78aa94 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Wed, 11 Jul 2018 10:38:18 +0300 Subject: [PATCH] Trim channel when switching away from it --- client/js/lounge.js | 1 + 1 file changed, 1 insertion(+) diff --git a/client/js/lounge.js b/client/js/lounge.js index d3a7caf4..e5627ad2 100644 --- a/client/js/lounge.js +++ b/client/js/lounge.js @@ -131,6 +131,7 @@ window.vueMounted = () => { if (lastChannel.messages.length > 0) { lastChannel.firstUnread = lastChannel.messages[lastChannel.messages.length - 1].id; + lastChannel.messages.splice(0, lastChannel.messages.length - 100); } }