diff --git a/static/js/chat_socket_functions/inital_old_tab.js b/static/js/chat_socket_functions/inital_old_tab.js
index 5fd7c4e..eb6cf8a 100644
--- a/static/js/chat_socket_functions/inital_old_tab.js
+++ b/static/js/chat_socket_functions/inital_old_tab.js
@@ -5,7 +5,7 @@ function inital_old_tab (){
if (el_tab !== null){
let dataset = el_tab.dataset;
old_item_tab_user = dataset['curReceiverItem'];
+ let old_item_tab_user_list = [el_tab,old_item_tab_user]
+ return old_item_tab_user_list
}
- let old_item_tab_user_list = [el_tab,old_item_tab_user]
- return old_item_tab_user_list
}
\ No newline at end of file
diff --git a/static/js/chat_sockets.js b/static/js/chat_sockets.js
index cf65f88..659d783 100644
--- a/static/js/chat_sockets.js
+++ b/static/js/chat_sockets.js
@@ -108,11 +108,12 @@ function wsReceiveData (e) {
}
if (data.unread_msgs_count > 0){
if (getInfoAboutUser('screen_width') < 800){
- if (window.location.href.includes("chat") || window.location.href.includes("chat"))
- let marker_new_messages = document.querySelector(".marker_messages_mobile");
- if (marker_new_messages.classList.contains('hide')){
- marker_new_messages.classList.add('show')
- marker_new_messages.classList.remove('hide')
+ if (!window.location.href.includes("chat") || !window.location.href.includes("chat")){
+ let marker_new_messages = document.querySelector(".marker_messages_mobile");
+ if (marker_new_messages.classList.contains('hide')){
+ marker_new_messages.classList.add('show')
+ marker_new_messages.classList.remove('hide')
+ }
}
}
update_count_unread_messages(data)
diff --git a/static/js/user_profile_2.js b/static/js/user_profile_2.js
index 5751ae9..3a6d4f8 100644
--- a/static/js/user_profile_2.js
+++ b/static/js/user_profile_2.js
@@ -83,6 +83,13 @@ function select_tab_profile (el,url,owner_type=null) {
if (window.location.href.includes("profile")){
selectTabProfileIfHisNotSelected(url)
}
+ if (getInfoAboutUser('screen_width') < 800){
+ let marker_new_messages = document.querySelector(".marker_messages_mobile");
+ if (marker_new_messages.classList.contains('show')){
+ marker_new_messages.classList.remove('show')
+ marker_new_messages.classList.add('hide')
+ }
+ }
deleteMarkerMessages(el)
checkStatesAfterTransitionToAnotherTabProfile()
goToChatIfChat()
diff --git a/templates/tb_base.html b/templates/tb_base.html
index 23b9958..9e1dc61 100644
--- a/templates/tb_base.html
+++ b/templates/tb_base.html
@@ -24,6 +24,7 @@
{% if user and not user.is_anonymous %}
+ {% include "connect_ws_js.html" %}