From b89a10e839d4bf44755fb961e659cc8a7ec81d52 Mon Sep 17 00:00:00 2001 From: Oleh Polisan Date: Sun, 21 Apr 2024 02:55:06 +0300 Subject: [PATCH] fixed bug with not changing to default icon --- src/main/mainWindow.ts | 4 ++-- src/renderer/patches/tray.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index d1c8931..e935a11 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -482,11 +482,11 @@ export async function createWindows() { export async function setTrayIcon(iconName: string) { if (!tray) return; - const Icons = new Set(["speaking", "muted", "deafened", "idle", "main"]); + const Icons = new Set(["speaking", "muted", "deafened", "idle", "icon"]); if (!Icons.has(iconName)) { console.warn("setTrayIcon: Invalid icon name", iconName); - iconName = "main"; + iconName = "icon"; } tray.setImage(join(STATIC_DIR, iconName + ".png")); } diff --git a/src/renderer/patches/tray.ts b/src/renderer/patches/tray.ts index 2bb8396..4d94044 100644 --- a/src/renderer/patches/tray.ts +++ b/src/renderer/patches/tray.ts @@ -45,7 +45,7 @@ onceReady.then(() => { if (params.state === "RTC_CONNECTED") { setCurrentState(); } else if (params.state === "RTC_DISCONNECTED") { - VesktopNative.app.setTrayIcon("main"); + VesktopNative.app.setTrayIcon("icon"); } }); });