diff options
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r-- | src/stores/SettingsStore.js | 12 |
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); |