Merge pull request #128 from WardPearce/fix/sub-feed
Fixed subscription feed
This commit is contained in:
@@ -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<Feed> {
|
||||
const path = new URL(buildPath('auth/feed'));
|
||||
path.search = new URLSearchParams({
|
||||
max_results: maxResults.toString(),
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user