diff --git a/materialious/src/lib/components/VideoList.svelte b/materialious/src/lib/components/VideoList.svelte index ceee9e94..ec267bfb 100644 --- a/materialious/src/lib/components/VideoList.svelte +++ b/materialious/src/lib/components/VideoList.svelte @@ -22,7 +22,9 @@ onMount(() => { if ($feedLastItemId) - document.getElementById($feedLastItemId)?.scrollIntoView({ behavior: 'instant' }); + document + .getElementById($feedLastItemId) + ?.scrollIntoView({ behavior: 'instant', block: 'center', inline: 'nearest' }); }); diff --git a/materialious/src/routes/(app)/search/[slug]/+page.svelte b/materialious/src/routes/(app)/search/[slug]/+page.svelte index 34efccd2..c147dd55 100644 --- a/materialious/src/routes/(app)/search/[slug]/+page.svelte +++ b/materialious/src/routes/(app)/search/[slug]/+page.svelte @@ -18,7 +18,9 @@ onMount(() => { if ($feedLastItemId) { - document.getElementById($feedLastItemId)?.scrollIntoView({ behavior: 'instant' }); + document + .getElementById($feedLastItemId) + ?.scrollIntoView({ behavior: 'instant', block: 'center', inline: 'nearest' }); } }); diff --git a/materialious/src/routes/(app)/search/[slug]/+page.ts b/materialious/src/routes/(app)/search/[slug]/+page.ts index 86a7d30a..43996078 100644 --- a/materialious/src/routes/(app)/search/[slug]/+page.ts +++ b/materialious/src/routes/(app)/search/[slug]/+page.ts @@ -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] + }); }); } diff --git a/materialious/src/routes/(app)/subscriptions/+page.ts b/materialious/src/routes/(app)/subscriptions/+page.ts index 48b7fdce..53370063 100644 --- a/materialious/src/routes/(app)/subscriptions/+page.ts +++ b/materialious/src/routes/(app)/subscriptions/+page.ts @@ -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] + }); }); } }