aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/SettingsStore.ts
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-08-04 00:12:03 +0100
committerLibravatar GitHub <noreply@github.com>2022-08-03 23:12:03 +0000
commitc2509e860752e23812bb408e331c02c918aadd54 (patch)
treeb855163ad1bddaaa19c47a9cea2713c6899ea1a5 /src/stores/SettingsStore.ts
parentRevert to older working version of 'macos-notification-state' (diff)
downloadferdium-app-c2509e860752e23812bb408e331c02c918aadd54.tar.gz
ferdium-app-c2509e860752e23812bb408e331c02c918aadd54.tar.zst
ferdium-app-c2509e860752e23812bb408e331c02c918aadd54.zip
chore: change values inside mobx actions to fix console warnings (#532)
Diffstat (limited to 'src/stores/SettingsStore.ts')
-rw-r--r--src/stores/SettingsStore.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/stores/SettingsStore.ts b/src/stores/SettingsStore.ts
index e2903c952..811bc6f76 100644
--- a/src/stores/SettingsStore.ts
+++ b/src/stores/SettingsStore.ts
@@ -100,8 +100,11 @@ export default class SettingsStore extends TypedStore {
100 }); 100 });
101 } 101 }
102 debug('Get appSettings resolves', resp.type, resp.data); 102 debug('Get appSettings resolves', resp.type, resp.data);
103 Object.assign(this._fileSystemSettingsCache[resp.type], resp.data); 103 this.actions.settings.update({
104 this.loaded = true; 104 type: resp.type,
105 data: resp.data,
106 });
107 this.setLoaded();
105 ipcRenderer.send('initialAppSettings', resp); 108 ipcRenderer.send('initialAppSettings', resp);
106 }); 109 });
107 110
@@ -148,6 +151,10 @@ export default class SettingsStore extends TypedStore {
148 }; 151 };
149 } 152 }
150 153
154 @action async setLoaded(): Promise<void> {
155 this.loaded = true;
156 }
157
151 @action async _update({ type, data }): Promise<void> { 158 @action async _update({ type, data }): Promise<void> {
152 const appSettings = this.all; 159 const appSettings = this.all;
153 if (!this.fileSystemSettingsTypes.includes(type)) { 160 if (!this.fileSystemSettingsTypes.includes(type)) {