1.1.28 upd msg counter and news
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user