fix: implemented workaround for broken or missing tray icon menu on linux

This commit is contained in:
jarome 2024-12-11 13:24:54 -03:00
parent d8b59cae05
commit fd8c57bff0

View File

@ -195,7 +195,7 @@ export class WindowManager {
this.mainWindow?.focus();
}
public static createSystemTray(language: string) {
public static async createSystemTray(language: string) {
let tray: Tray;
if (process.platform === "darwin") {
@ -263,6 +263,7 @@ export class WindowManager {
},
]);
tray.setContextMenu(contextMenu);
return contextMenu;
};
@ -274,6 +275,8 @@ export class WindowManager {
tray.setToolTip("Hydra");
if (process.platform !== "darwin") {
await updateSystemTray();
tray.addListener("click", () => {
if (this.mainWindow) {
if (