aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2018-11-16 20:40:11 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2018-11-16 20:40:11 +0100
commit9d2447cfd493da423ce8a42a421fa8075c359da7 (patch)
tree8b5c9c4fe339eb7a77696f9f4feba9078f04c02f /src/stores
parentFix linting (diff)
downloadferdium-app-9d2447cfd493da423ce8a42a421fa8075c359da7.tar.gz
ferdium-app-9d2447cfd493da423ce8a42a421fa8075c359da7.tar.zst
ferdium-app-9d2447cfd493da423ce8a42a421fa8075c359da7.zip
Add isSystemDarkModeEnabled to AppStore
Diffstat (limited to 'src/stores')
-rw-r--r--src/stores/AppStore.js7
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';
5import { getDoNotDisturb } from '@meetfranz/electron-notification-state'; 5import { getDoNotDisturb } from '@meetfranz/electron-notification-state';
6import AutoLaunch from 'auto-launch'; 6import AutoLaunch from 'auto-launch';
7import prettyBytes from 'pretty-bytes'; 7import prettyBytes from 'pretty-bytes';
8import isDarkMode from '@adlk/mojave-isdarkmode';
8 9
9import Store from './lib/Store'; 10import Store from './lib/Store';
10import Request from './lib/Request'; 11import 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() {