Skip to content

Commit

Permalink
fix: channel.state break on going to background (#2809)
Browse files Browse the repository at this point in the history
  • Loading branch information
isekovanic authored Nov 22, 2024
1 parent b3c0c82 commit 54ff925
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 54ff925

Please sign in to comment.