From 01cc1726cc647547f3a0b386d35fe8fa9e0f9fc1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 15 Aug 2022 07:19:41 +0200 Subject: [PATCH] fix chat flash --- files/assets/js/chat.js | 5 +++++ files/templates/chat.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js index b80aa6390..01cf98ee9 100644 --- a/files/assets/js/chat.js +++ b/files/assets/js/chat.js @@ -56,6 +56,11 @@ socket.on('speak', function(json) { chatline.classList.remove('chat-mention'); }; + notifs = notifs + 1; + if (notifs == 1) { + setTimeout(flash, 500); + } + let users = document.getElementsByClassName('userlink'); let last_user = users[users.length-1].innerHTML; diff --git a/files/templates/chat.html b/files/templates/chat.html index 6cf37a1ba..c77eda395 100644 --- a/files/templates/chat.html +++ b/files/templates/chat.html @@ -202,7 +202,7 @@ - + {% include "emoji_modal.html" %} {% include "expanded_image_modal.html" %}