Skip to content

Commit

Permalink
fix: channel.state break on going to background
Browse files Browse the repository at this point in the history
  • Loading branch information
isekovanic committed Nov 22, 2024
1 parent b3c0c82 commit 0790f3b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions package/src/components/Chat/hooks/useIsOnline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 0790f3b

Please sign in to comment.