A platform for community discussion. Free, open, simple.
FIX: We shouldn't memoize the last time something is read
Robin Ward9bdfaa195e95
diff --git a/app/assets/javascripts/discourse/lib/screen-track.js.es6 b/app/assets/javascripts/discourse/lib/screen-track.js.es6index d048c798a91..363454e1e95 100644--- a/app/assets/javascripts/discourse/lib/screen-track.js.es6+++ b/app/assets/javascripts/discourse/lib/screen-track.js.es6@@ -60,7 +60,7 @@ export default class {// Reset our timersreset() {- const now = this._getTime();+ const now = new Date().getTime();this._lastTick = now;this._lastScrolled = now;this._lastFlush = 0;@@ -74,7 +74,7 @@ export default class {}scrolled() {- this._lastScrolled = this._getTime();+ this._lastScrolled = new Date().getTime();}registerAnonCallback(cb) {@@ -224,8 +224,4 @@ export default class {});}}-- _getTime() {- return (this._time = this._time || new Date().getTime());- }}