From 3880b97cae9fe5bd6698bcd5b522275feb401b61 Mon Sep 17 00:00:00 2001 From: SBD Date: Wed, 29 Nov 2023 15:22:33 +0300 Subject: [PATCH] 0.8.414 --- .../etc_operations_for_chat_socket.js | 24 ++++++++++++------- static/js/chat_sockets.js | 1 + 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/static/js/chat_socket_functions/etc_operations_for_chat_socket.js b/static/js/chat_socket_functions/etc_operations_for_chat_socket.js index 543ab89..0aac18f 100644 --- a/static/js/chat_socket_functions/etc_operations_for_chat_socket.js +++ b/static/js/chat_socket_functions/etc_operations_for_chat_socket.js @@ -21,15 +21,21 @@ function loader_show_message (data) { let send_btn = document.querySelector(".send-message") let at = document.querySelector(".attach-file-btn-message") if (loader){ - if (loader.classList.contains("show")){ - send_btn.classList.remove("hide") - loader.classList.remove("show") - at.classList.remove("loader") - } else { - send_btn.classList.add("hide") - loader.classList.add("show") - at.classList.add("loader") - } + send_btn.classList.add("hide") + loader.classList.add("show") + at.classList.add("loader") + } else { + console.log("cannot find loader") + } +} +function loader_hide_message (data) { + let loader = document.querySelector(".loader_show_message"); + let send_btn = document.querySelector(".send-message") + let at = document.querySelector(".attach-file-btn-message") + if (loader){ + send_btn.classList.remove("hide") + loader.classList.remove("show") + at.classList.remove("loader") } else { console.log("cannot find loader") diff --git a/static/js/chat_sockets.js b/static/js/chat_sockets.js index 7d9e2c6..6fbeaa8 100644 --- a/static/js/chat_sockets.js +++ b/static/js/chat_sockets.js @@ -106,6 +106,7 @@ function wsReceiveData (e) { play_required_beep(data,beep) } loader_show_message(data) + loader_hide_message(data) }