From 0790f3ba6ba01e86d65267f9b5ddee6e38b14964 Mon Sep 17 00:00:00 2001 From: Ivan Sekovanikj Date: Fri, 22 Nov 2024 12:19:10 +0100 Subject: [PATCH] fix: channel.state break on going to background --- 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]);