Skip to content

Commit 0634719

Browse files
committed
(fix): Take initial useFollows from the local store
1 parent 46a90dc commit 0634719

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

apps/polycentric/src/common/lib/polycentric-hooks/PolycentricProvider.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ export function PolycentricProvider({
150150

151151
// Only sync when we already have an identity to sync for.
152152
if (c.activeIdentityKey) {
153+
// Read follows from the local store immediately — don't gate
154+
// the UI on the network sync. The sync runs in parallel and
155+
// re-refreshes once new events have been pulled in.
156+
await useFollows.getState().refresh(c);
153157
void c
154158
.sync()
155159
.then(() => useFollows.getState().refresh(c))

0 commit comments

Comments
 (0)