Skip to content

Commit

Permalink
Remove duplicate close-event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
mawie81 committed Jan 6, 2016
1 parent 1ccce62 commit 88a9668
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,16 @@ function createMainWindow() {
if (process.platform === 'darwin' && !win.forceClose) {
e.preventDefault();
win.hide();
} else if (process.platform === 'win32' && configStore.get('closeToTray')) {
win.hide();
e.preventDefault();
}
});
win.on('minimize', () => {
if (process.platform === 'win32' && configStore.get('minimizeToTray')) {
win.hide();
}
});
win.on('close', evt => {
if (process.platform === 'win32' && configStore.get('closeToTray')) {
win.hide();
evt.preventDefault();
}
});
return win;
}

Expand Down

0 comments on commit 88a9668

Please sign in to comment.