aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-11-20 17:45:57 +0100
committerLibravatar GitHub <noreply@github.com>2017-11-20 17:45:57 +0100
commit9d9e28585a8b7c7138aaf3109f4ae3ce8556c02b (patch)
tree6f3510ccd00f3573993adf3bd1b602fdd9c8e4ad
parentfix(Sidebar): Fix sidebar tab sorting (@josescgar) (diff)
parentfix linting issue (diff)
downloadferdium-app-9d9e28585a8b7c7138aaf3109f4ae3ce8556c02b.tar.gz
ferdium-app-9d9e28585a8b7c7138aaf3109f4ae3ce8556c02b.tar.zst
ferdium-app-9d9e28585a8b7c7138aaf3109f4ae3ce8556c02b.zip
Merge pull request #310 from meetfranz/feature/touchbar-app-crash
[PR] Touch Bar app crash
-rw-r--r--package.json1
-rw-r--r--src/components/ui/Subscription.js1
-rw-r--r--src/lib/TouchBar.js18
3 files changed, 13 insertions, 7 deletions
diff --git a/package.json b/package.json
index f9f6ca91c..ac9c96339 100644
--- a/package.json
+++ b/package.json
@@ -65,6 +65,7 @@
65 "react-sortable-hoc": "^0.6.7", 65 "react-sortable-hoc": "^0.6.7",
66 "react-tooltip": "^3.2.7", 66 "react-tooltip": "^3.2.7",
67 "route-parser": "^0.0.5", 67 "route-parser": "^0.0.5",
68 "semver": "^5.4.1",
68 "smoothscroll-polyfill": "^0.3.4", 69 "smoothscroll-polyfill": "^0.3.4",
69 "tar": "^4.0.2", 70 "tar": "^4.0.2",
70 "uuid": "^3.0.1" 71 "uuid": "^3.0.1"
diff --git a/src/components/ui/Subscription.js b/src/components/ui/Subscription.js
index 7f4c53d64..8bff72095 100644
--- a/src/components/ui/Subscription.js
+++ b/src/components/ui/Subscription.js
@@ -7,7 +7,6 @@ import Form from '../../lib/Form';
7import Radio from '../ui/Radio'; 7import Radio from '../ui/Radio';
8import Button from '../ui/Button'; 8import Button from '../ui/Button';
9import Loader from '../ui/Loader'; 9import Loader from '../ui/Loader';
10import { isWindows } from '../../environment';
11 10
12import { required } from '../../helpers/validation-helpers'; 11import { required } from '../../helpers/validation-helpers';
13 12
diff --git a/src/lib/TouchBar.js b/src/lib/TouchBar.js
index ad7849b8e..97c02d194 100644
--- a/src/lib/TouchBar.js
+++ b/src/lib/TouchBar.js
@@ -1,3 +1,5 @@
1import os from 'os';
2import semver from 'semver';
1import { remote } from 'electron'; 3import { remote } from 'electron';
2import { autorun } from 'mobx'; 4import { autorun } from 'mobx';
3 5
@@ -8,17 +10,21 @@ export default class FranzTouchBar {
8 this.stores = stores; 10 this.stores = stores;
9 this.actions = actions; 11 this.actions = actions;
10 12
11 this._initializeReactions(); 13 // Temporary fix for https://github.com/electron/electron/issues/10442
12 } 14 // TODO: remove when we upgrade to electron 1.8.2 or later
13 15 try {
14 _initializeReactions() { 16 if (isMac && semver.gt(os.release(), '16.6.0')) {
15 this.build = autorun(this._build.bind(this)); 17 this.build = autorun(this._build.bind(this));
18 }
19 } catch (err) {
20 console.error(err);
21 }
16 } 22 }
17 23
18 _build() { 24 _build() {
19 const currentWindow = remote.getCurrentWindow(); 25 const currentWindow = remote.getCurrentWindow();
20 26
21 if (isMac && this.stores.user.isLoggedIn) { 27 if (this.stores.user.isLoggedIn) {
22 const { TouchBar } = remote; 28 const { TouchBar } = remote;
23 const { TouchBarButton, TouchBarSpacer } = TouchBar; 29 const { TouchBarButton, TouchBarSpacer } = TouchBar;
24 30