diff options
author | 2017-10-24 22:30:15 +0200 | |
---|---|---|
committer | 2017-10-24 22:30:15 +0200 | |
commit | 2bfe8456d62d1ca828fe10a00c1c436b164cd061 (patch) | |
tree | c8a569d437d783814db02d71e026842bbe9ae0b4 | |
parent | Merge branch 'develop' of github.com:meetfranz/franz into develop (diff) | |
download | ferdium-app-2bfe8456d62d1ca828fe10a00c1c436b164cd061.tar.gz ferdium-app-2bfe8456d62d1ca828fe10a00c1c436b164cd061.tar.zst ferdium-app-2bfe8456d62d1ca828fe10a00c1c436b164cd061.zip |
Don't apply app.makeSingleInstance on macOS
-rw-r--r-- | src/index.js | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/index.js b/src/index.js index b07666ba2..9ca059f48 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -29,15 +29,17 @@ if (isWindows) { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | // Force single window | 31 | // Force single window |
32 | const isSecondInstance = app.makeSingleInstance(() => { | 32 | if (process.platform !== 'darwin') { |
33 | if (mainWindow) { | 33 | const isSecondInstance = app.makeSingleInstance(() => { |
34 | if (mainWindow.isMinimized()) mainWindow.restore(); | 34 | if (mainWindow) { |
35 | mainWindow.focus(); | 35 | if (mainWindow.isMinimized()) mainWindow.restore(); |
36 | } | 36 | mainWindow.focus(); |
37 | }); | 37 | } |
38 | }); | ||
38 | 39 | ||
39 | if (isSecondInstance) { | 40 | if (isSecondInstance) { |
40 | app.quit(); | 41 | app.quit(); |
42 | } | ||
41 | } | 43 | } |
42 | 44 | ||
43 | // Initialize Settings | 45 | // Initialize Settings |