From 54ff925405ad3cc3c269f92b054955fff3086e0a Mon Sep 17 00:00:00 2001 From: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Date: Fri, 22 Nov 2024 13:46:37 +0100 Subject: [PATCH] fix: channel.state break on going to background (#2809) --- package/src/components/Chat/hooks/useIsOnline.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/package/src/components/Chat/hooks/useIsOnline.ts b/package/src/components/Chat/hooks/useIsOnline.ts index b177c40cd2..661866d99d 100644 --- a/package/src/components/Chat/hooks/useIsOnline.ts +++ b/package/src/components/Chat/hooks/useIsOnline.ts @@ -30,11 +30,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]);