fixed bug with not changing to default icon

This commit is contained in:
Oleh Polisan 2024-04-21 02:55:06 +03:00
parent b9e5ad3277
commit b89a10e839
2 changed files with 3 additions and 3 deletions

View file

@ -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"));
}

View file

@ -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");
}
});
});