Skip to content

Commit 54ff925

Browse files
authored
fix: channel.state break on going to background (#2809)
1 parent b3c0c82 commit 54ff925

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
@@ -30,11 +30,6 @@ export const useIsOnline = <
3030
const onBackground = useCallback(() => {
3131
if (!closeConnectionOnBackground || !clientExists) return;
3232

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

0 commit comments

Comments
 (0)