diff options
author | 2021-07-15 23:10:08 +0530 | |
---|---|---|
committer | 2021-07-15 23:10:08 +0530 | |
commit | c3711a2b577a10584bac0fbddfb7bde108eb706c (patch) | |
tree | afd2210823b6e7dbbc250186c21496c19aff1217 /src/stores | |
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/stores')
-rw-r--r-- | src/stores/AppStore.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index bbcf78a43..ac6ca6d2d 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -7,7 +7,6 @@ import moment from 'moment'; | |||
7 | import AutoLaunch from 'auto-launch'; | 7 | import AutoLaunch from 'auto-launch'; |
8 | import ms from 'ms'; | 8 | import ms from 'ms'; |
9 | import { URL } from 'url'; | 9 | import { URL } from 'url'; |
10 | import os from 'os'; | ||
11 | import path from 'path'; | 10 | import path from 'path'; |
12 | import { readJsonSync } from 'fs-extra'; | 11 | import { readJsonSync } from 'fs-extra'; |
13 | 12 | ||
@@ -15,7 +14,7 @@ import Store from './lib/Store'; | |||
15 | import Request from './lib/Request'; | 14 | import Request from './lib/Request'; |
16 | import { CHECK_INTERVAL } from '../config'; | 15 | import { CHECK_INTERVAL } from '../config'; |
17 | import { | 16 | import { |
18 | DEFAULT_APP_SETTINGS, isMac, ferdiVersion, electronVersion, | 17 | DEFAULT_APP_SETTINGS, isMac, ferdiVersion, electronVersion, osRelease, |
19 | } from '../environment'; | 18 | } from '../environment'; |
20 | import locales from '../i18n/translations'; | 19 | import locales from '../i18n/translations'; |
21 | import { onVisibilityChange } from '../helpers/visibility-helper'; | 20 | import { onVisibilityChange } from '../helpers/visibility-helper'; |
@@ -261,7 +260,7 @@ export default class AppStore extends Store { | |||
261 | return { | 260 | return { |
262 | host: { | 261 | host: { |
263 | platform: process.platform, | 262 | platform: process.platform, |
264 | release: os.release(), | 263 | release: osRelease, |
265 | screens: screen.getAllDisplays(), | 264 | screens: screen.getAllDisplays(), |
266 | }, | 265 | }, |
267 | ferdi: { | 266 | ferdi: { |