fixed bug currentClient were shown even if muted

This commit is contained in:
Janis
2023-01-11 11:02:27 +01:00
parent 9a68fca2c7
commit c925a57f61
2 changed files with 11 additions and 2 deletions

View File

@@ -4,8 +4,13 @@ function drawClients() {
result = "";
if (thisClient) {
getClientsInChannel(thisClient.channel).forEach((c) => {
isHidden = CONFIG.hideSilent && c.talkStatus == 0;
result += `<div class="client-div" ${isHidden ? "hidden" : ""} style="color:${CONFIG.style.fontColor}; font-size:${CONFIG.style.fontSize}">`;
isHidden = CONFIG.hideSilent && (c.talkStatus == 0 || c.isMuted());
result += `<div class="client-div" ${
isHidden ? "hidden" : ""
} style="color:${CONFIG.style.fontColor}; font-size:${
CONFIG.style.fontSize
}">`;
result += '<div class="client-img-div">';
if (c.outputMuted) {
result += ' <img src="img/muted_output.svg" />';

View File

@@ -22,6 +22,10 @@ class Client {
this.talkStatus = talkStatus;
console.log(`Client created: ${this.id} - ${this.name}`);
}
isMuted() {
return this.inputMuted == true || this.outputMuted == true;
}
}
class List {