Skip to content

Commit 7b414ca

Browse files
committed
fix: channel.state break on going to background
1 parent 5a077bf commit 7b414ca

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)