We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45f4b3b commit 430687fCopy full SHA for 430687f
index.js
@@ -10,6 +10,7 @@ const {
10
autoUpdate,
11
getEnabledPlugins,
12
isAppVisible,
13
+ isTrayEnabled,
14
store,
15
} = require("./store");
16
const { fileExists, injectCSS } = require("./plugins/utils");
@@ -187,12 +188,16 @@ app.on("ready", () => {
187
188
if (!isAppVisible()) {
189
app.dock.hide();
190
}
191
+ }
192
- var forceQuit = false;
- app.on("before-quit", () => {
193
- forceQuit = true;
194
- });
+ var forceQuit = false;
+ app.on("before-quit", () => {
195
+ forceQuit = true;
196
+ });
197
+
198
+ if (is.macOS() || isTrayEnabled()) {
199
mainWindow.on("close", (event) => {
200
+ // Hide the window instead of quitting (quit is available in tray options)
201
if (!forceQuit) {
202
event.preventDefault();
203
mainWindow.hide();
0 commit comments