Skip to content

Commit

Permalink
reload subscribed content on subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
craigkai committed Jan 20, 2024
1 parent f71d205 commit 5276fa4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/supabaseDatabaseService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ export class SupabaseDatabaseService implements DatabaseService {
callback(self, payload);
}
)
.subscribe((status) => console.debug('Realtime status', status));
.subscribe((status) => {
// We call the load function to update in case our content is stale
// we we re-connect to the web socket.
self.load();
console.debug('Realtime status', status)
});
}

// Method to handle database errors
Expand Down

1 comment on commit 5276fa4

@vercel
Copy link

@vercel vercel bot commented on 5276fa4 Jan 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

volleyman – ./

volleyman.vercel.app
volleyman-git-main-craigkai.vercel.app
volleyman-craigkai.vercel.app

Please sign in to comment.