Declare globals for `drawAttention` and `isFocused`

pull/1/head
Daniel Gasienica 7 years ago
parent 06e3f09732
commit 0701768fd7

@ -3,7 +3,9 @@
/* global config: false */ /* global config: false */
/* global ConversationController: false */ /* global ConversationController: false */
/* global drawAttention: false */
/* global i18n: false */ /* global i18n: false */
/* global isFocused: false */
/* global Signal: false */ /* global Signal: false */
/* global storage: false */ /* global storage: false */
/* global Whisper: false */ /* global Whisper: false */
@ -34,7 +36,7 @@
}, },
update() { update() {
const { isEnabled } = this; const { isEnabled } = this;
const isFocused = window.isFocused(); const isAppFocused = isFocused();
const isAudioNotificationEnabled = const isAudioNotificationEnabled =
storage.get('audio-notification') || false; storage.get('audio-notification') || false;
const isAudioNotificationSupported = Settings.isAudioNotificationSupported(); const isAudioNotificationSupported = Settings.isAudioNotificationSupported();
@ -42,7 +44,7 @@
isAudioNotificationSupported && isAudioNotificationEnabled; isAudioNotificationSupported && isAudioNotificationEnabled;
const numNotifications = this.length; const numNotifications = this.length;
console.log('Update notifications:', { console.log('Update notifications:', {
isFocused, isAppFocused,
isEnabled, isEnabled,
numNotifications, numNotifications,
shouldPlayNotificationSound, shouldPlayNotificationSound,
@ -57,7 +59,7 @@
return; return;
} }
const isNotificationOmitted = isFocused; const isNotificationOmitted = isAppFocused;
if (isNotificationOmitted) { if (isNotificationOmitted) {
this.clear(); this.clear();
return; return;
@ -68,7 +70,7 @@
return; return;
} }
window.drawAttention(); drawAttention();
let title; let title;
let message; let message;

Loading…
Cancel
Save