Skip to content

Commit

Permalink
Merge pull request #2807 from GetStream/fix/channel-state-break-on-ba…
Browse files Browse the repository at this point in the history
…ckground

fix: channel.state break on going to background
  • Loading branch information
isekovanic authored Nov 22, 2024
2 parents 5a077bf + 7b414ca commit 6201f33
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions package/src/components/Chat/hooks/useIsOnline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ export const useIsOnline = <
const onBackground = useCallback(() => {
if (!closeConnectionOnBackground || !clientExists) return;

for (const cid in client.activeChannels) {
const channel = client.activeChannels[cid];
channel?.state.setIsUpToDate(false);
}

client.closeConnection();
setIsOnline(false);
}, [closeConnectionOnBackground, client, clientExists]);
Expand Down

0 comments on commit 6201f33

Please sign in to comment.