Skip to content

Commit

Permalink
Simulate double click.
Browse files Browse the repository at this point in the history
  • Loading branch information
airycanon committed Dec 13, 2017
1 parent 6ebb05f commit ec7086f
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
Expand Up @@ -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);
Expand Down

0 comments on commit ec7086f

Please sign in to comment.