From 648ef63a49bdb4b89452ae80baafe1f7f9586de4 Mon Sep 17 00:00:00 2001 From: WardPearce Date: Sat, 13 Apr 2024 12:24:48 +1200 Subject: [PATCH] Fixed subscription feed --- materialious/src/lib/Api/index.ts | 3 ++- materialious/src/routes/subscriptions/+page.svelte | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/materialious/src/lib/Api/index.ts b/materialious/src/lib/Api/index.ts index 56bcf03b..1b2191e8 100644 --- a/materialious/src/lib/Api/index.ts +++ b/materialious/src/lib/Api/index.ts @@ -12,6 +12,7 @@ import type { ChannelPage, Comments, DeArrow, + Feed, Playlist, PlaylistPage, ReturnYTDislikes, @@ -142,7 +143,7 @@ export async function getSearch( return await resp.json(); } -export async function getFeed(maxResults: number, page: number) { +export async function getFeed(maxResults: number, page: number): Promise { const path = new URL(buildPath('auth/feed')); path.search = new URLSearchParams({ max_results: maxResults.toString(), diff --git a/materialious/src/routes/subscriptions/+page.svelte b/materialious/src/routes/subscriptions/+page.svelte index 9b31c789..5daaac4c 100644 --- a/materialious/src/routes/subscriptions/+page.svelte +++ b/materialious/src/routes/subscriptions/+page.svelte @@ -8,7 +8,7 @@ export let data; let currentPage = 1; - $: videos = data.feed.notifications; + $: videos = [...data.feed.videos, ...data.feed.notifications]; activePage.set('subscriptions'); @@ -18,7 +18,7 @@ if (feed.notifications.length === 0) { event.detail.complete(); } else { - videos = [...videos, ...feed.notifications]; + videos = [...videos, ...feed.videos, ...feed.notifications]; event.detail.loaded(); } }