9
This commit is contained in:
@@ -5,7 +5,7 @@ function inital_old_tab (){
|
|||||||
if (el_tab !== null){
|
if (el_tab !== null){
|
||||||
let dataset = el_tab.dataset;
|
let dataset = el_tab.dataset;
|
||||||
old_item_tab_user = dataset['curReceiverItem'];
|
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
|
|
||||||
}
|
}
|
||||||
@@ -108,11 +108,12 @@ function wsReceiveData (e) {
|
|||||||
}
|
}
|
||||||
if (data.unread_msgs_count > 0){
|
if (data.unread_msgs_count > 0){
|
||||||
if (getInfoAboutUser('screen_width') < 800){
|
if (getInfoAboutUser('screen_width') < 800){
|
||||||
if (window.location.href.includes("chat") || window.location.href.includes("chat"))
|
if (!window.location.href.includes("chat") || !window.location.href.includes("chat")){
|
||||||
let marker_new_messages = document.querySelector(".marker_messages_mobile");
|
let marker_new_messages = document.querySelector(".marker_messages_mobile");
|
||||||
if (marker_new_messages.classList.contains('hide')){
|
if (marker_new_messages.classList.contains('hide')){
|
||||||
marker_new_messages.classList.add('show')
|
marker_new_messages.classList.add('show')
|
||||||
marker_new_messages.classList.remove('hide')
|
marker_new_messages.classList.remove('hide')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
update_count_unread_messages(data)
|
update_count_unread_messages(data)
|
||||||
|
|||||||
@@ -83,6 +83,13 @@ function select_tab_profile (el,url,owner_type=null) {
|
|||||||
if (window.location.href.includes("profile")){
|
if (window.location.href.includes("profile")){
|
||||||
selectTabProfileIfHisNotSelected(url)
|
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)
|
deleteMarkerMessages(el)
|
||||||
checkStatesAfterTransitionToAnotherTabProfile()
|
checkStatesAfterTransitionToAnotherTabProfile()
|
||||||
goToChatIfChat()
|
goToChatIfChat()
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<script src="{% static "js/global_js.js" %}"></script>
|
<script src="{% static "js/global_js.js" %}"></script>
|
||||||
<script src="{% static "js/chat_socket_start.js" %}"></script>
|
<script src="{% static "js/chat_socket_start.js" %}"></script>
|
||||||
{% if user and not user.is_anonymous %}
|
{% if user and not user.is_anonymous %}
|
||||||
|
{% include "connect_ws_js.html" %}
|
||||||
<script src='{% static "js/chat_sockets.js" %}'></script>
|
<script src='{% static "js/chat_sockets.js" %}'></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user