diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-11-16 20:47:22 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-11-16 20:47:22 +0100 |
commit | 5c1aeaca015088272afa12ca76ebbdd78832ea60 (patch) | |
tree | eceec82c776e625e70cfa0fc025ae592450a4f71 /src/stores/AppStore.js | |
parent | Polishing & increasing contrast (diff) | |
download | ferdium-app-5c1aeaca015088272afa12ca76ebbdd78832ea60.tar.gz ferdium-app-5c1aeaca015088272afa12ca76ebbdd78832ea60.tar.zst ferdium-app-5c1aeaca015088272afa12ca76ebbdd78832ea60.zip |
use native electron.systemPreferences.isDarkMode()
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r-- | src/stores/AppStore.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index e24160b4c..d1ed2596b 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -1,11 +1,10 @@ | |||
1 | import { remote, ipcRenderer, shell } from 'electron'; | 1 | import { remote, ipcRenderer, shell, systemPreferences } from 'electron'; |
2 | import { action, computed, observable } from 'mobx'; | 2 | import { action, computed, observable } from 'mobx'; |
3 | import moment from 'moment'; | 3 | import moment from 'moment'; |
4 | import key from 'keymaster'; | 4 | 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'; | ||
9 | 8 | ||
10 | import Store from './lib/Store'; | 9 | import Store from './lib/Store'; |
11 | import Request from './lib/Request'; | 10 | import Request from './lib/Request'; |
@@ -80,7 +79,7 @@ export default class AppStore extends Store { | |||
80 | ]); | 79 | ]); |
81 | } | 80 | } |
82 | 81 | ||
83 | async setup() { | 82 | setup() { |
84 | this._appStartsCounter(); | 83 | this._appStartsCounter(); |
85 | // Focus the active service | 84 | // Focus the active service |
86 | window.addEventListener('focus', this.actions.service.focusActiveService); | 85 | window.addEventListener('focus', this.actions.service.focusActiveService); |
@@ -163,7 +162,7 @@ export default class AppStore extends Store { | |||
163 | 162 | ||
164 | this._healthCheck(); | 163 | this._healthCheck(); |
165 | 164 | ||
166 | this.isSystemDarkModeEnabled = await isDarkMode(); | 165 | this.isSystemDarkModeEnabled = systemPreferences.isDarkMode(); |
167 | } | 166 | } |
168 | 167 | ||
169 | @computed get cacheSize() { | 168 | @computed get cacheSize() { |