rebuild timeline loader to use query maps

This commit is contained in:
hzrd149
2023-11-28 17:11:04 -06:00
parent 7d4693571c
commit abc70e2db2
16 changed files with 276 additions and 350 deletions

View File

@@ -7,7 +7,7 @@ export function useTimelineCurserIntersectionCallback(timeline: TimelineLoader)
// if the cursor is set too far ahead and the last block did not overlap with the cursor
// we need to keep loading blocks until the timeline is complete or the blocks pass the cursor
useInterval(() => {
timeline.loadNextBlocks();
timeline.triggerBlockLoads();
}, 1000);
return useIntersectionMapCallback(
@@ -25,7 +25,7 @@ export function useTimelineCurserIntersectionCallback(timeline: TimelineLoader)
if (oldestEvent) {
timeline.setCursor(oldestEvent.created_at);
timeline.loadNextBlocks();
timeline.triggerBlockLoads();
}
},
[timeline],