You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While investigating some slow updates (repeatedly seeing old content as I scrolled -- more visible on Android but also happening pretty regularly on iOS) I noticed this line of code which appears to be doing nothing?
this._lastTick will always be less than now, so the early return will never be executed AFAICT. Diagnosing it with some console.logs showed this to be the case as well (the early return never executed).
I think this logic should be inverted as follows:
const now = new Date().getTime();
if (now - this._lastTick < 30) {
return;
}
this._lastTick = now;
this._shouldUpdateContent &&
this._groupRefs.forEach((group) =>
idx(() => group.current.contentConversion(offsetY))
);
And possibly it should be using the updateTimeInterval prop which currently seems to be documented, but completely unused in the code (unless I missed something).
The text was updated successfully, but these errors were encountered:
While investigating some slow updates (repeatedly seeing old content as I scrolled -- more visible on Android but also happening pretty regularly on iOS) I noticed this line of code which appears to be doing nothing?
react-native-largelist/src/LargeList.js
Lines 453 to 458 in d93c898
this._lastTick
will always be less thannow
, so the early return will never be executed AFAICT. Diagnosing it with some console.logs showed this to be the case as well (the early return never executed).I think this logic should be inverted as follows:
And possibly it should be using the
updateTimeInterval
prop which currently seems to be documented, but completely unused in the code (unless I missed something).The text was updated successfully, but these errors were encountered: