scroller: do update during animation frame

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-05-14 20:10:51 -07:00
parent 19e068e36d
commit 7ba4055839
1 changed files with 5 additions and 1 deletions

View File

@ -171,7 +171,11 @@ export default defineComponent({
if (this.scrollingRecyclerUpdateTimer) return; if (this.scrollingRecyclerUpdateTimer) return;
this.scrollingRecyclerUpdateTimer = window.setTimeout(() => { this.scrollingRecyclerUpdateTimer = window.setTimeout(() => {
this.scrollingRecyclerUpdateTimer = 0; this.scrollingRecyclerUpdateTimer = 0;
// Run the actual update during animation frame
window.requestAnimationFrame(() => {
this.updateFromRecyclerScroll(); this.updateFromRecyclerScroll();
});
}, 100); }, 100);
// Update that we're scrolling with the recycler // Update that we're scrolling with the recycler