
function update_count_unread_messages (data) {
    let list_unrd = document.querySelectorAll(".unredmessages_value_text")
    let list_unrd_parent = document.querySelectorAll(".icon_unread_messages")
    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()
    }
}

function play_required_beep (data,beep) {
    beep.play()
}