Skip to content

Commit

Permalink
fix: timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jouwdan committed Aug 9, 2023
1 parent 68ca64a commit d2c4357
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/web/src/routes/(course-reader)/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,14 @@
setInterval(updatePageCount, 30 * 1000);
});
$: !presenceSetup && onlineStatus && setupPresence(supabase, $page.params.courseid);
function setupPresenceLocally() {
setupPresence(supabase, $page.params.courseid);
setTimeout(() => {
presenceSetup = true;
}, 1000);
}
$: !presenceSetup && $onlineStatus && setupPresenceLocally();
$: $currentLo &&
$onlineStatus &&
Expand Down

0 comments on commit d2c4357

Please sign in to comment.