Skip to content

Commit 6201f33

Browse files
authored
Merge pull request #2807 from GetStream/fix/channel-state-break-on-background
fix: channel.state break on going to background
2 parents 5a077bf + 7b414ca commit 6201f33

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

package/src/components/Chat/hooks/useIsOnline.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@ export const useIsOnline = <
2929
const onBackground = useCallback(() => {
3030
if (!closeConnectionOnBackground || !clientExists) return;
3131

32-
for (const cid in client.activeChannels) {
33-
const channel = client.activeChannels[cid];
34-
channel?.state.setIsUpToDate(false);
35-
}
36-
3732
client.closeConnection();
3833
setIsOnline(false);
3934
}, [closeConnectionOnBackground, client, clientExists]);

0 commit comments

Comments
 (0)