don't disable tray 'Open' item when window is shown (doesnt work correctly)

This commit is contained in:
Vendicated 2024-01-16 01:22:10 +01:00
parent 2e4c834a90
commit 83e74b98d5
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18

View file

@ -78,8 +78,7 @@ function initTray(win: BrowserWindow) {
label: "Open",
click() {
win.show();
},
enabled: false
}
},
{
label: "About",
@ -122,14 +121,6 @@ function initTray(win: BrowserWindow) {
tray.setToolTip("Vesktop");
tray.setContextMenu(trayMenu);
tray.on("click", () => win.show());
win.on("show", () => {
trayMenu.items[0].enabled = false;
});
win.on("hide", () => {
trayMenu.items[0].enabled = true;
});
}
async function clearData(win: BrowserWindow) {