diff options
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 38edff1b4..e24160b4c 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -5,6 +5,7 @@ import key from 'keymaster'; | |||
5 | import { getDoNotDisturb } from '@meetfranz/electron-notification-state'; | 5 | import { getDoNotDisturb } from '@meetfranz/electron-notification-state'; |
6 | import AutoLaunch from 'auto-launch'; | 6 | import AutoLaunch from 'auto-launch'; |
7 | import prettyBytes from 'pretty-bytes'; | 7 | import prettyBytes from 'pretty-bytes'; |
8 | import isDarkMode from '@adlk/mojave-isdarkmode'; | ||
8 | 9 | ||
9 | import Store from './lib/Store'; | 10 | import Store from './lib/Store'; |
10 | import Request from './lib/Request'; | 11 | import Request from './lib/Request'; |
@@ -50,6 +51,8 @@ export default class AppStore extends Store { | |||
50 | 51 | ||
51 | @observable isSystemMuteOverridden = false; | 52 | @observable isSystemMuteOverridden = false; |
52 | 53 | ||
54 | @observable isSystemDarkModeEnabled = false; | ||
55 | |||
53 | @observable isClearingAllCache = false; | 56 | @observable isClearingAllCache = false; |
54 | 57 | ||
55 | @observable isFullScreen = mainWindow.isFullScreen(); | 58 | @observable isFullScreen = mainWindow.isFullScreen(); |
@@ -77,7 +80,7 @@ export default class AppStore extends Store { | |||
77 | ]); | 80 | ]); |
78 | } | 81 | } |
79 | 82 | ||
80 | setup() { | 83 | async setup() { |
81 | this._appStartsCounter(); | 84 | this._appStartsCounter(); |
82 | // Focus the active service | 85 | // Focus the active service |
83 | window.addEventListener('focus', this.actions.service.focusActiveService); | 86 | window.addEventListener('focus', this.actions.service.focusActiveService); |
@@ -159,6 +162,8 @@ export default class AppStore extends Store { | |||
159 | this.locale = this._getDefaultLocale(); | 162 | this.locale = this._getDefaultLocale(); |
160 | 163 | ||
161 | this._healthCheck(); | 164 | this._healthCheck(); |
165 | |||
166 | this.isSystemDarkModeEnabled = await isDarkMode(); | ||
162 | } | 167 | } |
163 | 168 | ||
164 | @computed get cacheSize() { | 169 | @computed get cacheSize() { |