From dd39f76725cd0ba4726f2c408631eef9751bc60a Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Sat, 13 Sep 2025 11:51:10 -0400 Subject: [PATCH] Client now only injects chat buffer once. --- www/js/channel/channel.js | 6 ------ www/js/channel/chat.js | 10 ++++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/www/js/channel/channel.js b/www/js/channel/channel.js index ba4f433..fd72349 100644 --- a/www/js/channel/channel.js +++ b/www/js/channel/channel.js @@ -130,12 +130,6 @@ class channel{ //Store queue lock status this.queueLock = data.queueLock; - - //For each chat held in the chat buffer - for(let chat of data.chatBuffer){ - //Display the chat - this.chatBox.displayChat(chat); - } } /** diff --git a/www/js/channel/chat.js b/www/js/channel/chat.js index cae6fac..a8eb996 100644 --- a/www/js/channel/chat.js +++ b/www/js/channel/chat.js @@ -393,6 +393,16 @@ class chatBox{ handleClientInfo(data){ this.updateFlairSelect(data.flairList, data.user.flair); this.updateHighSelect(data.user.highLevel); + + //If the chatbox is empty + if(this.chatBuffer.childElementCount <= 0){ + //For each chat held in the chat buffer + for(let chat of data.chatBuffer){ + //Display the chat + this.displayChat(chat); + } + } + } /**