Skip to content
Snippets Groups Projects
Commit 5aaa3c09 authored by Kegan Dougal's avatar Kegan Dougal
Browse files

hidden/minimise/focus disaster disclaimer with the TODO

parent b36a0c71
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment