aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-08 00:01:37 +0000
committerLibravatar GitHub <noreply@github.com>2021-08-08 05:31:37 +0530
commit97d51a7763b14c92ee71ff9a012311dd9498d803 (patch)
treebd36005031ecb1148f27aa541e7a92a5e3aa4c0c /src/stores/AppStore.js
parent5.6.1-nightly.17 [skip ci] (diff)
downloadferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.gz
ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.tar.zst
ferdium-app-97d51a7763b14c92ee71ff9a012311dd9498d803.zip
refactor: path-references refactoring and using 'import' instead of 'require' (#1752)
* refactor references to 'userData' and 'appData' directories to move hardcoding into single location * convert to es6 for lower memory usage as per https://codesource.io/the-difference-between-import-and-require-in-javascript/
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 6b5ca7c9a..1d706f1ef 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -12,7 +12,6 @@ import moment from 'moment';
12import AutoLaunch from 'auto-launch'; 12import AutoLaunch from 'auto-launch';
13import ms from 'ms'; 13import ms from 'ms';
14import { URL } from 'url'; 14import { URL } from 'url';
15import path from 'path';
16import { readJsonSync } from 'fs-extra'; 15import { readJsonSync } from 'fs-extra';
17 16
18import Store from './lib/Store'; 17import Store from './lib/Store';
@@ -24,6 +23,7 @@ import {
24 ferdiVersion, 23 ferdiVersion,
25 electronVersion, 24 electronVersion,
26 osRelease, 25 osRelease,
26 userDataPath,
27} from '../environment'; 27} from '../environment';
28import locales from '../i18n/translations'; 28import locales from '../i18n/translations';
29import { onVisibilityChange } from '../helpers/visibility-helper'; 29import { onVisibilityChange } from '../helpers/visibility-helper';
@@ -307,9 +307,7 @@ export default class AppStore extends Store {
307 id: workspace.id, 307 id: workspace.id,
308 services: workspace.services, 308 services: workspace.services,
309 })), 309 })),
310 windowSettings: readJsonSync( 310 windowSettings: readJsonSync(userDataPath('window-state.json')),
311 path.join(app.getPath('userData'), 'window-state.json'),
312 ),
313 settings, 311 settings,
314 features: this.stores.features.features, 312 features: this.stores.features.features,
315 user: this.stores.user.data.id, 313 user: this.stores.user.data.id,