mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-08-03 11:31:20 +02:00
fix: fixed tray click bug. fixes #196
This commit is contained in:
@@ -13,7 +13,15 @@ trayModule.addTray = function (mainWindow, options = { icon: "" }) {
|
||||
tray.setContextMenu(menu);
|
||||
|
||||
tray.on("click", function () {
|
||||
mainWindow.isVisible() ? mainWindow.focus() : mainWindow.show();
|
||||
if (mainWindow.isVisible()) {
|
||||
if (!mainWindow.isFocused()) {
|
||||
mainWindow.focus();
|
||||
} else {
|
||||
mainWindow.hide();
|
||||
}
|
||||
} else {
|
||||
mainWindow.show();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user