Make the read-marker less annoying

We considered the user active if there had been a user_activity event within
the last 500ms, but those events were only raised every 500ms, so it was
possible that we would be considered inactive immediately. Use
UserActivity.userCurrentlyActive() instead, which fixes this.

Also increase CURRENTLY_ACTIVE_THRESHOLD_MS to 2 seconds.
This commit is contained in:
Richard van der Hoff 2016-03-22 12:15:17 +00:00
parent c31fbf1214
commit 2ac88a3d89
2 changed files with 4 additions and 21 deletions

View file

@ -17,7 +17,7 @@ limitations under the License.
var dis = require("./dispatcher");
var MIN_DISPATCH_INTERVAL_MS = 500;
var CURRENTLY_ACTIVE_THRESHOLD_MS = 500;
var CURRENTLY_ACTIVE_THRESHOLD_MS = 2000;
/**
* This class watches for user activity (moving the mouse or pressing a key)