diff options
author | vantezzen <properly@protonmail.com> | 2019-09-14 13:47:49 +0200 |
---|---|---|
committer | vantezzen <properly@protonmail.com> | 2019-09-14 13:47:49 +0200 |
commit | e9746cbfe618193ab580836643812e601ac4295a (patch) | |
tree | c0bbf8d14c7ffc86c71405129e0819f9f65dcdeb /src/stores/SettingsStore.js | |
parent | docs: add dayzlun as a contributor (#34) (diff) | |
download | ferdium-app-e9746cbfe618193ab580836643812e601ac4295a.tar.gz ferdium-app-e9746cbfe618193ab580836643812e601ac4295a.tar.zst ferdium-app-e9746cbfe618193ab580836643812e601ac4295a.zip |
Implement #7
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() { |