mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: We shouldn't memoize the last time something is read
This commit is contained in:
parent
bed3560d61
commit
9bdfaa195e
@ -60,7 +60,7 @@ export default class {
|
||||
|
||||
// Reset our timers
|
||||
reset() {
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user