Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: last seen date erroneously updated when browser in background
In some cases user may be "last seen" even though browser tab is in the background or computer is locked
- Loading branch information
1 parent
352f98d
commit 122fb80
Showing
6 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// for android we test webkit | ||
var hiddenProperty = document.hidden !== undefined ? "hidden" : ( | ||
document.webkitHidden !== undefined ? "webkitHidden" : undefined | ||
); | ||
|
||
export default function() { | ||
if (hiddenProperty !== undefined){ | ||
return !document[hiddenProperty]; | ||
} else { | ||
return document && document.hasFocus; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters