swap call status to be bound to call state and not active call id

This commit is contained in:
Gigiaj 2025-05-21 21:12:03 -05:00
parent e688c19350
commit dabe7f7849

View file

@ -20,7 +20,7 @@ type CallNavStatusProps = {
space: Room | null;
};
export function CallNavStatus({ space }: CallNavStatusProps) {
const { activeCallRoomId, isAudioEnabled, isVideoEnabled, toggleAudio, toggleVideo, hangUp } =
const { activeCallRoomId, isAudioEnabled, isVideoEnabled, isCallActive, toggleAudio, toggleVideo, hangUp } =
useCallState();
const mx = useMatrixClient();
const { navigateRoom } = useRoomNavigate();
@ -30,7 +30,7 @@ export function CallNavStatus({ space }: CallNavStatusProps) {
navigateRoom(activeCallRoomId);
}
};
if (!activeCallRoomId) {
if (!isCallActive) {
return (
<Box
direction="Column"