diff options
author | 2021-07-15 23:10:08 +0530 | |
---|---|---|
committer | 2021-07-15 23:10:08 +0530 | |
commit | c3711a2b577a10584bac0fbddfb7bde108eb706c (patch) | |
tree | afd2210823b6e7dbbc250186c21496c19aff1217 /src/lib | |
parent | Revert 'useragent-generator' to published npm version without github repo ref... (diff) | |
download | ferdium-app-c3711a2b577a10584bac0fbddfb7bde108eb706c.tar.gz ferdium-app-c3711a2b577a10584bac0fbddfb7bde108eb706c.tar.zst ferdium-app-c3711a2b577a10584bac0fbddfb7bde108eb706c.zip |
Minor perf tweaks to evaluate capturing of env-specific values only once in the application.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/TouchBar.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/TouchBar.js b/src/lib/TouchBar.js index 11eaec306..781cd0895 100644 --- a/src/lib/TouchBar.js +++ b/src/lib/TouchBar.js | |||
@@ -1,9 +1,8 @@ | |||
1 | import os from 'os'; | ||
2 | import semver from 'semver'; | 1 | import semver from 'semver'; |
3 | import { TouchBar, getCurrentWindow } from '@electron/remote'; | 2 | import { TouchBar, getCurrentWindow } from '@electron/remote'; |
4 | import { autorun } from 'mobx'; | 3 | import { autorun } from 'mobx'; |
5 | 4 | ||
6 | import { isMac } from '../environment'; | 5 | import { isMac, osRelease } from '../environment'; |
7 | 6 | ||
8 | export default class FranzTouchBar { | 7 | export default class FranzTouchBar { |
9 | constructor(stores, actions) { | 8 | constructor(stores, actions) { |
@@ -13,7 +12,7 @@ export default class FranzTouchBar { | |||
13 | // Temporary fix for https://github.com/electron/electron/issues/10442 | 12 | // Temporary fix for https://github.com/electron/electron/issues/10442 |
14 | // TODO: remove when we upgrade to electron 1.8.2 or later | 13 | // TODO: remove when we upgrade to electron 1.8.2 or later |
15 | try { | 14 | try { |
16 | if (isMac && semver.gt(os.release(), '16.6.0')) { | 15 | if (isMac && semver.gt(osRelease, '16.6.0')) { |
17 | this.build = autorun(this._build.bind(this)); | 16 | this.build = autorun(this._build.bind(this)); |
18 | } | 17 | } |
19 | } catch (err) { | 18 | } catch (err) { |