Skip to content

Commit 07dfdb3

Browse files
committed
fix: remove spinner of first poll of sogs even when not selected
1 parent 3e9f0f1 commit 07dfdb3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

ts/session/apis/open_group_api/opengroupV2/OpenGroupServerPoller.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ export class OpenGroupServerPoller {
322322
// ==> At this point all those results need to trigger conversation updates, so update what we have to update
323323
await handleBatchPollResults(this.serverUrl, batchPollResults, subrequestOptions);
324324

325+
// this is very hacky but is needed to remove the spinner of an opengroup conversation while it loads the first patch of messages.
326+
// Absolutely not the react way, but well.
325327
for (const room of subrequestOptions) {
326328
if (room.type === 'messages' && !room.messages?.sinceSeqNo && room.messages?.roomId) {
327329
const conversationKey = getOpenGroupV2ConversationId(
@@ -346,6 +348,13 @@ export class OpenGroupServerPoller {
346348
})
347349
);
348350
});
351+
} else {
352+
window.inboxStore?.dispatch(
353+
markConversationInitialLoadingInProgress({
354+
conversationKey,
355+
isInitialFetchingInProgress: false,
356+
})
357+
);
349358
}
350359
}
351360
}, 5000);

0 commit comments

Comments
 (0)