Skip to content

Commit

Permalink
Merge pull request trazyn#86 from airycanon/develop
Browse files Browse the repository at this point in the history
Show window when double click tray.
  • Loading branch information
衣带渐宽人渐悔 authored Dec 13, 2017

Unverified

This user has not yet uploaded their public signing key.
2 parents 6ebb05f + ec7086f commit 2e289fe
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -418,6 +418,19 @@ function updateTray(unread = 0) {
tray.on('right-click', () => {
tray.popUpContextMenu();
});

let clicked = false;
tray.on('click', () => {
if (clicked) {
mainWindow.show();
clicked = false;
} else {
clicked = true;
setTimeout(() => {
clicked = false;
}, 400);
}
});
}

tray.setImage(icon);

0 comments on commit 2e289fe

Please sign in to comment.