From c3eced0aee03004af82cd840b0e9e5d65c9557af Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Fri, 10 Nov 2017 23:13:46 +0100 Subject: fix issue with share settings with main process --- src/stores/SettingsStore.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 7cd7c9114..c301eaf82 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js @@ -40,7 +40,8 @@ export default class SettingsStore extends Store { Object.assign(result, settings); }); - this._shareSettingsWithMainProcess(); + // We need a little hack to wait until everything is patched + setTimeout(() => this._shareSettingsWithMainProcess(), 0); gaEvent('Settings', 'update'); } @@ -54,6 +55,7 @@ export default class SettingsStore extends Store { // Reactions _shareSettingsWithMainProcess() { + console.log(this.all); ipcRenderer.send('settings', this.all); } } -- cgit v1.2.3-70-g09d2