Skip to content

Commit

Permalink
Modifying handleTrayClick to minimize when window is visible (#452)
Browse files Browse the repository at this point in the history
* Modifying handleTrayClick to minimize when window is visible.

* Style matching
  • Loading branch information
ben-bartholomew authored Aug 14, 2024
1 parent fb0b61c commit a4b1931
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/helpers/trayManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,14 @@ export class TrayManager {

private handleTrayClick() {
const mainWindow = getMainWindow();
mainWindow?.show();
if (!mainWindow)
return;

if (mainWindow.isVisible()) {
mainWindow.hide();
} else {
mainWindow.show();
}
}

private destroy(): void {
Expand Down

0 comments on commit a4b1931

Please sign in to comment.