summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-16 15:34:33 +0100
committerKegan Dougal <kegan@matrix.org>2014-09-16 15:35:23 +0100
commit5aaa3c09c1066333f6fa51effb771432f1c63bf1 (patch)
treea3994afeb2987063656e5fed6d4a921d0594ba11 /webclient
parentAdded utility function containsBingWord and hook up some css to it. (diff)
downloadsynapse-5aaa3c09c1066333f6fa51effb771432f1c63bf1.tar.xz
hidden/minimise/focus disaster disclaimer with the TODO
Diffstat (limited to 'webclient')
-rw-r--r--webclient/components/matrix/event-handler-service.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js
index 389eee5471..d61a150463 100644
--- a/webclient/components/matrix/event-handler-service.js
+++ b/webclient/components/matrix/event-handler-service.js
@@ -183,6 +183,10 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) {
                 var shouldBing = $rootScope.containsBingWord(event.content.body);
             
                 // TODO: Binging every message when idle doesn't make much sense. Can we use this more sensibly?
+                // Unfortunately document.hidden = false on ubuntu chrome if chrome is minimised / does not have focus;
+                // true when you swap tabs though. However, for the case where the chat screen is OPEN and there is
+                // another window on top, we want to be notifying for those events. This DOES mean that there will be
+                // notifications when currently viewing the chat screen though, but that is preferable to the alternative imo.
                 var isIdle = (document.hidden || matrixService.presence.unavailable === mPresence.getState());
                 
                 if (shouldBing) {