More fixes

This commit is contained in:
WardPearce
2025-06-01 22:03:12 +12:00
parent f5b931f4a9
commit 5e8f15aff0
4 changed files with 12 additions and 4 deletions
@@ -22,7 +22,9 @@
onMount(() => {
if ($feedLastItemId)
document.getElementById($feedLastItemId)?.scrollIntoView({ behavior: 'instant' });
document
.getElementById($feedLastItemId)
?.scrollIntoView({ behavior: 'instant', block: 'center', inline: 'nearest' });
});
</script>
@@ -18,7 +18,9 @@
onMount(() => {
if ($feedLastItemId) {
document.getElementById($feedLastItemId)?.scrollIntoView({ behavior: 'instant' });
document
.getElementById($feedLastItemId)
?.scrollIntoView({ behavior: 'instant', block: 'center', inline: 'nearest' });
}
});
@@ -23,7 +23,9 @@ export async function load({ params, url }) {
}
} else {
getSearch(params.slug, { type: type }).then((newSearch) => {
searchCacheStore.set({ [type]: Array.from(new Set({ ...newSearch, ...search })) });
searchCacheStore.set({
[type]: [...newSearch, ...search]
});
});
}
@@ -20,7 +20,9 @@ export async function load() {
} else {
await getFeed(100, 1).then((feeds) => {
const newVideos = [...feeds.notifications, ...feeds.videos];
feedCacheStore.set({ subscription: Array.from(new Set({ ...newVideos, ...videos })) });
feedCacheStore.set({
subscription: [...newVideos, ...videos]
});
});
}
}