aboutsummaryrefslogtreecommitdiffstats
path: root/src/stores/AppStore.js
diff options
context:
space:
mode:
authorLibravatar Vijay A <avijayr@protonmail.com>2021-08-13 09:07:33 +0530
committerLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-08-13 07:32:56 +0000
commitb2eef1daaa41313257e3f439d4d5604314c9ae2c (patch)
tree5fc0d7ff2d9c94d783ad166307f9e550a34086a2 /src/stores/AppStore.js
parentchore: Replace old '@meetfranz/electron-notification-state' with 'macos-notif... (diff)
downloadferdium-app-b2eef1daaa41313257e3f439d4d5604314c9ae2c.tar.gz
ferdium-app-b2eef1daaa41313257e3f439d4d5604314c9ae2c.tar.zst
ferdium-app-b2eef1daaa41313257e3f439d4d5604314c9ae2c.zip
fix(App): Fix app focus detection
Diffstat (limited to 'src/stores/AppStore.js')
-rw-r--r--src/stores/AppStore.js8
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';
29import locales from '../i18n/translations'; 29import locales from '../i18n/translations';
30import { onVisibilityChange } from '../helpers/visibility-helper';
31import { getLocale } from '../helpers/i18n-helpers'; 30import { getLocale } from '../helpers/i18n-helpers';
32 31
33import { 32import {
@@ -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', () => {