diff --git a/src/UserActivity.js b/src/UserActivity.js index 46a46f0b0e..cee1b4efe2 100644 --- a/src/UserActivity.js +++ b/src/UserActivity.js @@ -31,8 +31,8 @@ class UserActivity { start() { document.onmousemove = this._onUserActivity.bind(this); document.onkeypress = this._onUserActivity.bind(this); - this.lastActivityAt = (new Date).getTime(); - this.lastDispatchAt = 0; + this.lastActivityAtTs = new Date().getTime(); + this.lastDispatchAtTs = 0; } /** @@ -44,9 +44,9 @@ class UserActivity { } _onUserActivity() { - this.lastActivityAt = (new Date).getTime(); - if (this.lastDispatchAt < this.lastActivityAt - MIN_DISPATCH_INTERVAL) { - this.lastDispatchAt = this.lastActivityAt; + this.lastActivityAtTs = (new Date).getTime(); + if (this.lastDispatchAtTs < this.lastActivityAtTs - MIN_DISPATCH_INTERVAL) { + this.lastDispatchAtTs = this.lastActivityAtTs; dis.dispatch({ action: 'user_activity' });