aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/SettingsStore.js
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-02-15 16:58:23 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-02-15 16:58:23 +0100
commitf265e39711546e14c08744f8e8a774046aa88d07 (patch)
treed8c99b0f9f60fdb8cdac85848dc066d28cbe8615 /src/stores/SettingsStore.js
parentfeat(Windows): Add more app icon resolutions (@Stanzilla) (diff)
downloadferdium-app-f265e39711546e14c08744f8e8a774046aa88d07.tar.gz
ferdium-app-f265e39711546e14c08744f8e8a774046aa88d07.tar.zst
ferdium-app-f265e39711546e14c08744f8e8a774046aa88d07.zip
replace localStorage with mobx-localstorage
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r--src/stores/SettingsStore.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js
index da99a720f..26d895b7e 100644
--- a/src/stores/SettingsStore.js
+++ b/src/stores/SettingsStore.js
@@ -26,15 +26,19 @@ export default class SettingsStore extends Store {
26 } 26 }
27 27
28 @computed get all() { 28 @computed get all() {
29 console.log('get all settings');
29 return new SettingsModel(this.allSettingsRequest.result); 30 return new SettingsModel(this.allSettingsRequest.result);
30 } 31 }
31 32
32 @action async _update({ settings }) { 33 @action async _update({ settings }) {
33 await this.updateSettingsRequest.execute(settings)._promise; 34 await this.updateSettingsRequest.execute(settings)._promise;
34 await this.allSettingsRequest.patch((result) => { 35 // await this.allSettingsRequest.patch((result) => {
35 if (!result) return; 36 // if (!result) return;
36 extendObservable(result, settings); 37 // console.log(result.runInBackground, settings.runInBackground);
37 }); 38 // extendObservable(result, settings);
39 // console.log(result.runInBackground);
40 // // result.update(settings);
41 // });
38 42
39 // We need a little hack to wait until everything is patched 43 // We need a little hack to wait until everything is patched
40 setTimeout(() => this._shareSettingsWithMainProcess(), 0); 44 setTimeout(() => this._shareSettingsWithMainProcess(), 0);