Fix focus detection

pull/749/head
lilia 8 years ago committed by Scott Nonnenberg
parent 81a40bb548
commit a381d9c975
No known key found for this signature in database
GPG Key ID: A4931C09644C654B

@ -10,6 +10,14 @@
window.Whisper = window.Whisper || {};
var inboxFocused = false;
window.addEventListener('blur', function() {
inboxFocused = false;
});
window.addEventListener('focus', function() {
inboxFocused = true;
clearAttention();
});
window.isFocused = function() {
return inboxFocused;
};
@ -39,7 +47,6 @@
};
/* Inbox window controller */
var inboxFocused = false;
var inboxOpened = false;
var inboxWindowId = 'inbox';
var appWindow = null;

Loading…
Cancel
Save