fix(coding): rehydrate selected conversation on foreground
This commit is contained in:
@@ -511,14 +511,12 @@ export function createCodingConversationStore(
|
||||
};
|
||||
});
|
||||
const entry = get().entriesByConversationId[conversationId];
|
||||
const snapshotFlight = !entry?.reducer.snapshot
|
||||
|| entry.reducer.invalidation
|
||||
|| entry.loadState !== 'live'
|
||||
? get().loadSnapshot(
|
||||
conversationId,
|
||||
entry?.reducer.invalidation ? 'recovering' : 'loading',
|
||||
)
|
||||
: Promise.resolve(entry.reducer.snapshot);
|
||||
const refreshMode = entry?.reducer.invalidation
|
||||
? 'recovering'
|
||||
: entry?.reducer.snapshot && entry.loadState === 'live'
|
||||
? 'silent'
|
||||
: 'loading';
|
||||
const snapshotFlight = get().loadSnapshot(conversationId, refreshMode);
|
||||
await Promise.all([snapshotFlight, get().connectEvents()]);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user