From 96e96a5e43b9d6a6b8b2b0a3428a5fe6dc82eeab Mon Sep 17 00:00:00 2001 From: Timo K Date: Tue, 23 Sep 2025 12:25:05 +0200 Subject: [PATCH] fix leaving Signed-off-by: Timo K --- src/room/GroupCallView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 367f72a1..614c7b50 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -68,7 +68,6 @@ import { import { GroupCallErrorBoundary } from "./GroupCallErrorBoundary.tsx"; import { useNewMembershipManager as useNewMembershipManagerSetting, - useExperimentalToDeviceTransport as useExperimentalToDeviceTransportSetting, useSetting, } from "../settings/settings"; import { useTypedEventEmitter } from "../useEvents"; @@ -310,6 +309,7 @@ export const GroupCallView: FC = ({ useNewMembershipManager, ]); + // TODO refactor this + "joined" to just one callState const [left, setLeft] = useState(false); const navigate = useNavigate(); @@ -319,6 +319,7 @@ export const GroupCallView: FC = ({ let playSound: CallEventSounds = "left"; if (reason === "timeout" || reason === "decline") playSound = reason; + setJoined(false); setLeft(true); const audioPromise = leaveSoundContext.current?.playSound(playSound); // In embedded/widget mode the iFrame will be killed right after the call ended prohibiting the posthog event from getting sent, @@ -354,6 +355,7 @@ export const GroupCallView: FC = ({ ); }, [ + setJoined, leaveSoundContext, widget, room.roomId,