From 261aea805400deb02e40a4cc59684a784e3f0d64 Mon Sep 17 00:00:00 2001 From: Oleh Polisan Date: Fri, 24 May 2024 17:16:28 +0300 Subject: [PATCH] use one voiceActions for both mute and deaf --- src/renderer/patches/tray.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/renderer/patches/tray.ts b/src/renderer/patches/tray.ts index b326b58..bf1dbdc 100644 --- a/src/renderer/patches/tray.ts +++ b/src/renderer/patches/tray.ts @@ -8,8 +8,7 @@ import { Logger } from "@vencord/types/utils"; import { findByPropsLazy, onceReady } from "@vencord/types/webpack"; import { FluxDispatcher, UserStore } from "@vencord/types/webpack/common"; -const muteActions = findByPropsLazy("isSelfMute"); -const deafActions = findByPropsLazy("isSelfDeaf"); +const voiceActions = findByPropsLazy("isSelfMute"); export var isInCall = false; const logger = new Logger("VesktopTrayIcon"); @@ -41,9 +40,9 @@ async function changeIconColor(iconName: string) { } export function setCurrentState() { - if (deafActions.isSelfDeaf()) { + if (voiceActions.isSelfDeaf()) { changeIconColor("deafened"); - } else if (muteActions.isSelfMute()) { + } else if (voiceActions.isSelfMute()) { changeIconColor("muted"); } else { changeIconColor("idle");