From ad0f79b8899a4431043b120cdd88aa190dd2a853 Mon Sep 17 00:00:00 2001 From: wowie Date: Sun, 13 Oct 2024 09:30:42 -0500 Subject: [PATCH] fix following page & add suspended account handle --- src/mixins.ts | 10 +++---- src/views/FollowingView.vue | 59 ++++++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 20 deletions(-) diff --git a/src/mixins.ts b/src/mixins.ts index 6e8c04b..0f1bbb2 100644 --- a/src/mixins.ts +++ b/src/mixins.ts @@ -126,18 +126,16 @@ export async function followersStreaming(streamers: string[], cursor: number): P * @param cursor which 35 streamer chunk to fetch * @returns the streamers in that list that are online */ -export async function getParsedFollowing( - streamers: string[], - cursor: number -): Promise { +export async function getParsedFollowing(streamers: string[], cursor: number): Promise { // do not make request if no followers if (streamers.length == 0) { return [] } let res: FollowingStreamer[] = [] - - const payloadData = streamers.slice(cursor, cursor + 35) + const start = cursor * 35 + const end = (cursor + 1) * 35 + const payloadData = streamers.slice(start, end) const payload = { streamers: payloadData diff --git a/src/views/FollowingView.vue b/src/views/FollowingView.vue index 36801f0..f6d880b 100644 --- a/src/views/FollowingView.vue +++ b/src/views/FollowingView.vue @@ -1,13 +1,11 @@ +