From d53cbdd48f099bd4516ff345dd048fa03dd371de Mon Sep 17 00:00:00 2001 From: harshbaz Date: Tue, 19 Dec 2023 15:51:37 +0530 Subject: [PATCH] load first --- .../(feed)/(splash)/hotornot/[id=videoId]/+page.svelte | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/web-client/src/routes/(feed)/(splash)/hotornot/[id=videoId]/+page.svelte b/packages/web-client/src/routes/(feed)/(splash)/hotornot/[id=videoId]/+page.svelte index cffadf98c..d43255693 100644 --- a/packages/web-client/src/routes/(feed)/(splash)/hotornot/[id=videoId]/+page.svelte +++ b/packages/web-client/src/routes/(feed)/(splash)/hotornot/[id=videoId]/+page.svelte @@ -33,7 +33,7 @@ let videos: PostPopulated[] = [] let currentVideoIndex = 0 let lastWatchedVideoIndex = -1 let noMoreVideos = false -let loading = false +let loading = true let fetchedVideosCount = 0 let loadTimeout: ReturnType | undefined = undefined @@ -66,7 +66,6 @@ async function fetchNextVideos(force = false) { } else { clearTimeout(loadTimeout) showError = true - loading = false } return } else { @@ -87,7 +86,6 @@ async function fetchNextVideos(force = false) { } await tick() - loading = false Log('info', 'Fetched videos for feed', { noMoreVideos, @@ -101,6 +99,7 @@ async function fetchNextVideos(force = false) { noMoreVideos, source: 'hotOrNot.fetchNextVideos', }) + } finally { loading = false } }