Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/trazyn/weweChat
Browse files Browse the repository at this point in the history
  • Loading branch information
trazyn committed Dec 17, 2017
2 parents 99cf2ba + 2e289fe commit eda40a2
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 eda40a2

Please sign in to comment.