diff options
Diffstat (limited to 'src/stores')
-rw-r--r-- | src/stores/AppStore.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 180f01af6..72ddc2927 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -27,7 +27,6 @@ import { | |||
27 | ferdiLocale, | 27 | ferdiLocale, |
28 | } from '../environment'; | 28 | } from '../environment'; |
29 | import locales from '../i18n/translations'; | 29 | import locales from '../i18n/translations'; |
30 | import { onVisibilityChange } from '../helpers/visibility-helper'; | ||
31 | import { getLocale } from '../helpers/i18n-helpers'; | 30 | import { getLocale } from '../helpers/i18n-helpers'; |
32 | 31 | ||
33 | import { | 32 | import { |
@@ -221,10 +220,9 @@ export default class AppStore extends Store { | |||
221 | 220 | ||
222 | this.isSystemDarkModeEnabled = nativeTheme.shouldUseDarkColors; | 221 | this.isSystemDarkModeEnabled = nativeTheme.shouldUseDarkColors; |
223 | 222 | ||
224 | onVisibilityChange((isVisible) => { | 223 | ipcRenderer.on('isWindowFocused', (event, isFocused) => { |
225 | this.isFocused = isVisible; | 224 | debug('Setting is focused to', isFocused); |
226 | 225 | this.isFocused = isFocused; | |
227 | debug('Window is visible/focused', isVisible); | ||
228 | }); | 226 | }); |
229 | 227 | ||
230 | powerMonitor.on('suspend', () => { | 228 | powerMonitor.on('suspend', () => { |