diff options
Diffstat (limited to 'src/stores/SettingsStore.js')
-rw-r--r-- | src/stores/SettingsStore.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/stores/SettingsStore.js b/src/stores/SettingsStore.js index 6c7b586a5..2975499b3 100644 --- a/src/stores/SettingsStore.js +++ b/src/stores/SettingsStore.js | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ipcRenderer } from 'electron'; | 1 | import { ipcRenderer, remote } from 'electron'; |
2 | import { | 2 | import { |
3 | action, computed, observable, set, | 3 | action, computed, observable, set, reaction, |
4 | } from 'mobx'; | 4 | } from 'mobx'; |
5 | import localStorage from 'mobx-localstorage'; | 5 | import localStorage from 'mobx-localstorage'; |
6 | 6 | ||
@@ -55,6 +55,13 @@ export default class SettingsStore extends Store { | |||
55 | // We need to wait until `appSettingsRequest` has been executed once, otherwise we can't patch the result. If we don't wait we'd run into an issue with mobx not reacting to changes of previously not existing keys | 55 | // We need to wait until `appSettingsRequest` has been executed once, otherwise we can't patch the result. If we don't wait we'd run into an issue with mobx not reacting to changes of previously not existing keys |
56 | await this.appSettingsRequest._promise; | 56 | await this.appSettingsRequest._promise; |
57 | await this._migrate(); | 57 | await this._migrate(); |
58 | |||
59 | reaction( | ||
60 | () => this.all.app.autohideMenuBar, | ||
61 | () => remote.getCurrentWindow().setAutoHideMenuBar( | ||
62 | this.all.app.autohideMenuBar, | ||
63 | ), | ||
64 | ); | ||
58 | } | 65 | } |
59 | 66 | ||
60 | @computed get app() { | 67 | @computed get app() { |