diff options
author | 2021-12-21 04:34:57 +0100 | |
---|---|---|
committer | 2021-12-21 04:34:57 +0100 | |
commit | 2e30d3ae95592c3440c4347821c4f9e68b3e40b4 (patch) | |
tree | 0efa7df63f517c009b13140ec4660739d2090213 /src/stores/SettingsStore.js | |
parent | Update submodules, browserslist data updates and linter fixes [skip ci] (diff) | |
download | ferdium-app-2e30d3ae95592c3440c4347821c4f9e68b3e40b4.tar.gz ferdium-app-2e30d3ae95592c3440c4347821c4f9e68b3e40b4.tar.zst ferdium-app-2e30d3ae95592c3440c4347821c4f9e68b3e40b4.zip |
Reduce AppLayout flashing
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r-- | src/stores/SettingsStore.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index ac9356404..e638d84b8 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -19,7 +19,7 @@ export default class SettingsStore extends Store { | |||
19 | 'updateAppSettings', | 19 | 'updateAppSettings', |
20 | ); | 20 | ); |
21 | 21 | ||
22 | startup = true; | 22 | loaded = false; |
23 | 23 | ||
24 | fileSystemSettingsTypes = FILE_SYSTEM_SETTINGS_TYPES; | 24 | fileSystemSettingsTypes = FILE_SYSTEM_SETTINGS_TYPES; |
25 | 25 | ||
@@ -84,11 +84,10 @@ export default class SettingsStore extends Store { | |||
84 | ipcRenderer.on('appSettings', (event, resp) => { | 84 | ipcRenderer.on('appSettings', (event, resp) => { |
85 | // Lock on startup if enabled in settings | 85 | // Lock on startup if enabled in settings |
86 | if ( | 86 | if ( |
87 | this.startup && | 87 | !this.loaded && |
88 | resp.type === 'app' && | 88 | resp.type === 'app' && |
89 | resp.data.lockingFeatureEnabled | 89 | resp.data.lockingFeatureEnabled |
90 | ) { | 90 | ) { |
91 | this.startup = false; | ||
92 | process.nextTick(() => { | 91 | process.nextTick(() => { |
93 | if (!this.all.app.locked) { | 92 | if (!this.all.app.locked) { |
94 | this.all.app.locked = true; | 93 | this.all.app.locked = true; |
@@ -97,6 +96,7 @@ export default class SettingsStore extends Store { | |||
97 | } | 96 | } |
98 | debug('Get appSettings resolves', resp.type, resp.data); | 97 | debug('Get appSettings resolves', resp.type, resp.data); |
99 | Object.assign(this._fileSystemSettingsCache[resp.type], resp.data); | 98 | Object.assign(this._fileSystemSettingsCache[resp.type], resp.data); |
99 | this.loaded = true; | ||
100 | ipcRenderer.send('initialAppSettings', resp); | 100 | ipcRenderer.send('initialAppSettings', resp); |
101 | }); | 101 | }); |
102 | 102 | ||