diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/components/ui/Subscription.js | 1 | ||||
-rw-r--r-- | src/lib/TouchBar.js | 18 |
2 files changed, 12 insertions, 7 deletions
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'; | |||
7 | import Radio from '../ui/Radio'; | 7 | import Radio from '../ui/Radio'; |
8 | import Button from '../ui/Button'; | 8 | import Button from '../ui/Button'; |
9 | import Loader from '../ui/Loader'; | 9 | import Loader from '../ui/Loader'; |
10 | import { isWindows } from '../../environment'; | ||
11 | 10 | ||
12 | import { required } from '../../helpers/validation-helpers'; | 11 | import { 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 @@ | |||
1 | import os from 'os'; | ||
2 | import semver from 'semver'; | ||
1 | import { remote } from 'electron'; | 3 | import { remote } from 'electron'; |
2 | import { autorun } from 'mobx'; | 4 | import { 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 | ||