1.1.28 upd msg counter and news

This commit is contained in:
2024-07-03 18:24:35 +03:00
parent 2695738ae3
commit e2b205240e
3 changed files with 14 additions and 7 deletions

View File

@@ -3317,6 +3317,10 @@ details[open] summary ~ *{
.self_news_text>ol>li{
margin: 10px 0;
}
.self_news_text>ol>li>ul{
list-style: disc;
margin-left: 20px;
}
.advertisement_block_news {
display: none;
}

View File

@@ -7,14 +7,16 @@ function update_count_unread_messages (data) {
let i = 0
for (i;i < list_unrd.length;i++){
if (!list_unrd_parent[i].classList.contains("showed")){
// list_unrd_parent[i].classList.toggle("showed")
// list_unrd[i].innerHTML = data.unread_msgs_count.toString()
} else {
let current_count = parseInt(list_unrd[i].innerHTML);
list_unrd[i].innerHTML = (current_count + 1).toString();
}
if(data.unread_msgs_count){
list_unrd[i].innerHTML = (current_count + 1).toString();
}
if(current_count === 0){
list_unrd_parent[i].classList.toggle("showed")
}
}
}
}

View File

@@ -579,6 +579,7 @@ function selectedUserMessenger (ticket_id=null,user_id=null,el){
if (loader){
loader.classList.toggle("show")
}
update_count_unread_messages()
// let left_curtain = document.querySelector('.curtain.left')
document.querySelector(".info_profile").innerHTML = data.html;
document.querySelector(".enter-message-inp").focus()