fixed bug with not changing to default icon
This commit is contained in:
parent
b9e5ad3277
commit
b89a10e839
2 changed files with 3 additions and 3 deletions
|
@ -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"));
|
||||
}
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue