Sped up history

This commit is contained in:
WardPearce
2024-03-15 22:29:41 +13:00
parent a4066d5791
commit e515e08d8c
+3 -1
View File
@@ -13,9 +13,11 @@
async function loadPageHistory(page: number = 1) {
const videoIds = await getHistory(page);
let promises = [];
for (const videoId of videoIds) {
history = [...history, await getVideo(videoId)];
promises.push(getVideo(videoId));
}
history = [...history, ...(await Promise.all(promises))];
}
onMount(async () => {