summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-11-06 19:33:15 +0100
committerLibravatar GitHub <noreply@github.com>2017-11-06 19:33:15 +0100
commit18ca0ee9c2e75f329e4fd1d1495e3a8665608760 (patch)
treef0bec80833c4c6ab4ac165a6212a73f9238b19f0
parentMerge pull request #217 from meetfranz/develop (diff)
parentMerge branch 'develop' of github.com:meetfranz/franz into develop (diff)
downloadferdium-app-5.0.0-beta.13.tar.gz
ferdium-app-5.0.0-beta.13.tar.zst
ferdium-app-5.0.0-beta.13.zip
Merge pull request #228 from meetfranz/developv5.0.0-beta.13
Beta 13 hotfix
-rw-r--r--CHANGELOG.md8
-rw-r--r--package.json2
-rw-r--r--src/index.js34
3 files changed, 24 insertions, 20 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b5a0755c..024afe93c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
1<a name="5.0.0-beta.13"></a>
2# [5.0.0-beta.13](https://github.com/meetfranz/franz/compare/v5.0.0-beta.12...v5.0.0-beta.13) (2017-11-06)
3
4### Bug Fixes
5
6* **Windows:** Fix issue with multiple close handlers that prevent the app from quitting ([eea593e](https://github.com/meetfranz/franz/commit/eea593e))
7
8
1<a name="5.0.0-beta.12"></a> 9<a name="5.0.0-beta.12"></a>
2# [5.0.0-beta.12](https://github.com/meetfranz/franz/compare/v5.0.0-beta.11...v5.0.0-beta.12) (2017-11-05) 10# [5.0.0-beta.12](https://github.com/meetfranz/franz/compare/v5.0.0-beta.11...v5.0.0-beta.12) (2017-11-05)
3 11
diff --git a/package.json b/package.json
index 057dc6d60..9b56cdf27 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
2 "name": "franz", 2 "name": "franz",
3 "productName": "Franz", 3 "productName": "Franz",
4 "appId": "com.meetfranz.franz", 4 "appId": "com.meetfranz.franz",
5 "version": "5.0.0-beta.12", 5 "version": "5.0.0-beta.13",
6 "description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.", 6 "description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.",
7 "copyright": "adlk x franz - Stefan Malzner", 7 "copyright": "adlk x franz - Stefan Malzner",
8 "main": "index.js", 8 "main": "index.js",
diff --git a/src/index.js b/src/index.js
index a3aa14732..f0fe56ae5 100644
--- a/src/index.js
+++ b/src/index.js
@@ -26,19 +26,18 @@ if (isWindows) {
26} 26}
27 27
28// Force single window 28// Force single window
29if (process.platform !== 'darwin') { 29const isSecondInstance = app.makeSingleInstance(() => {
30 const isSecondInstance = app.makeSingleInstance(() => { 30 if (mainWindow) {
31 if (mainWindow) { 31 if (mainWindow.isMinimized()) mainWindow.restore();
32 if (mainWindow.isMinimized()) mainWindow.restore(); 32 mainWindow.focus();
33 mainWindow.focus();
34 }
35 });
36
37 if (isSecondInstance) {
38 app.quit();
39 } 33 }
34});
35
36if (isSecondInstance) {
37 app.exit();
40} 38}
41 39
40
42// Initialize Settings 41// Initialize Settings
43const settings = new Settings(); 42const settings = new Settings();
44 43
@@ -86,9 +85,13 @@ const createWindow = async () => {
86 // when you should delete the corresponding element. 85 // when you should delete the corresponding element.
87 if (!willQuitApp && (settings.get('runInBackground') === undefined || settings.get('runInBackground'))) { 86 if (!willQuitApp && (settings.get('runInBackground') === undefined || settings.get('runInBackground'))) {
88 e.preventDefault(); 87 e.preventDefault();
89 mainWindow.hide(); 88 if (isWindows) {
89 mainWindow.minimize();
90 } else {
91 mainWindow.hide();
92 }
90 93
91 if (process.platform === 'win32') { 94 if (isWindows && settings.get('minimizeToSystemTray')) {
92 mainWindow.setSkipTaskbar(true); 95 mainWindow.setSkipTaskbar(true);
93 } 96 }
94 } else { 97 } else {
@@ -111,13 +114,6 @@ const createWindow = async () => {
111 app.isMaximized = true; 114 app.isMaximized = true;
112 }); 115 });
113 116
114 mainWindow.on('close', (e) => {
115 if (settings.get('minimizeToSystemTray')) {
116 e.preventDefault();
117 mainWindow.minimize();
118 }
119 });
120
121 mainWindow.on('unmaximize', () => { 117 mainWindow.on('unmaximize', () => {
122 app.isMaximized = false; 118 app.isMaximized = false;
123 }); 119 });