moved determination of isHidden to client object

This commit is contained in:
Janis
2023-01-11 13:22:08 +01:00
parent b10b7ad58d
commit 6fdc0d4ee0
4 changed files with 23 additions and 16 deletions

View File

@@ -6,14 +6,7 @@ class Channel {
}
class Client {
constructor(
id,
channel,
name,
inputMuted = false,
outputMuted = false,
talkStatus = 0
) {
constructor(id, channel, name, inputMuted = false, outputMuted = false, talkStatus = 0) {
this.id = id;
this.channel = channel;
this.name = name;
@@ -26,6 +19,12 @@ class Client {
isMuted() {
return this.inputMuted == true || this.outputMuted == true;
}
isHidden() {
return (
(CONFIG.hideSilent && (this.talkStatus == 0 || this.isMuted())) || (CONFIG.hideSelf && this.id == selfClient.id)
);
}
}
class List {