refactor
This commit is contained in:
parent
5fed84c04d
commit
4fb6d8d872
1 changed files with 2 additions and 6 deletions
|
@ -274,12 +274,8 @@ function createMainWindow() {
|
|||
win.setMenuBarVisibility(false);
|
||||
|
||||
win.on("close", e => {
|
||||
if (
|
||||
isQuitting ||
|
||||
(process.platform !== "darwin" &&
|
||||
(Settings.store.minimizeToTray === false || Settings.store.tray === false))
|
||||
)
|
||||
return;
|
||||
const useTray = Settings.store.minimizeToTray && Settings.store.tray;
|
||||
if (isQuitting || (process.platform !== "darwin" && !useTray)) return;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
|
|
Reference in a new issue