Skip to content

Commit

Permalink
load first
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh-mn-yral committed Dec 19, 2023
1 parent c8b8f6c commit d53cbdd
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof setTimeout> | undefined = undefined
Expand Down Expand Up @@ -66,7 +66,6 @@ async function fetchNextVideos(force = false) {
} else {
clearTimeout(loadTimeout)
showError = true
loading = false
}
return
} else {
Expand All @@ -87,7 +86,6 @@ async function fetchNextVideos(force = false) {
}
await tick()
loading = false
Log('info', 'Fetched videos for feed', {
noMoreVideos,
Expand All @@ -101,6 +99,7 @@ async function fetchNextVideos(force = false) {
noMoreVideos,
source: 'hotOrNot.fetchNextVideos',
})
} finally {
loading = false
}
}
Expand Down

0 comments on commit d53cbdd

Please sign in to comment.