From 90fa6d02d7991a1f3389c3fd5894c1aa19b30317 Mon Sep 17 00:00:00 2001 From: Half-Shot Date: Fri, 8 Nov 2024 13:14:45 +0000 Subject: [PATCH] Clear reactions if we're clearing timeouts. --- src/useReactions.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/useReactions.tsx b/src/useReactions.tsx index 7f11b141..f4aa92d7 100644 --- a/src/useReactions.tsx +++ b/src/useReactions.tsx @@ -301,6 +301,8 @@ export const ReactionsProvider = ({ room.off(MatrixRoomEvent.Redaction, handleReactionEvent); room.off(MatrixRoomEvent.LocalEchoUpdated, handleReactionEvent); reactionTimeouts.forEach((t) => clearTimeout(t)); + // If we're clearing timeouts, we also clear all reactions. + setReactions({}); }; }, [room, addRaisedHand, removeRaisedHand, memberships, raisedHands]);