From f265e39711546e14c08744f8e8a774046aa88d07 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Thu, 15 Feb 2018 16:58:23 +0100 Subject: replace localStorage with mobx-localstorage --- src/stores/SettingsStore.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/stores/SettingsStore.js') 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 { } @computed get all() { + console.log('get all settings'); return new SettingsModel(this.allSettingsRequest.result); } @action async _update({ settings }) { await this.updateSettingsRequest.execute(settings)._promise; - await this.allSettingsRequest.patch((result) => { - if (!result) return; - extendObservable(result, settings); - }); + // await this.allSettingsRequest.patch((result) => { + // if (!result) return; + // console.log(result.runInBackground, settings.runInBackground); + // extendObservable(result, settings); + // console.log(result.runInBackground); + // // result.update(settings); + // }); // We need a little hack to wait until everything is patched setTimeout(() => this._shareSettingsWithMainProcess(), 0); -- cgit v1.2.3-70-g09d2