From f23c99229684e83ed33a12af9785e58eb5013016 Mon Sep 17 00:00:00 2001 From: Timo <16718859+toger5@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:10:18 +0100 Subject: [PATCH] add is video room or condition (#12374) Signed-off-by: Timo K --- src/hooks/room/useRoomCall.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/hooks/room/useRoomCall.ts b/src/hooks/room/useRoomCall.ts index 92f350087f..308c1dc5cb 100644 --- a/src/hooks/room/useRoomCall.ts +++ b/src/hooks/room/useRoomCall.ts @@ -41,6 +41,7 @@ import { ViewRoomPayload } from "../../dispatcher/payloads/ViewRoomPayload"; import { Action } from "../../dispatcher/actions"; import { CallStore, CallStoreEvent } from "../../stores/CallStore"; import { calculateRoomVia } from "../../utils/permalinks/Permalinks"; +import { isVideoRoom } from "../../utils/video-rooms"; export enum PlatformCallType { ElementCall, @@ -113,8 +114,10 @@ export const useRoomCall = ( const isConnectedToCall = useConnectionState(groupCall) === ConnectionState.Connected; const hasGroupCall = groupCall !== null; const hasActiveCallSession = useParticipantCount(groupCall) > 0; - const isViewingCall = useEventEmitterState(SdkContextClass.instance.roomViewStore, UPDATE_EVENT, () => - SdkContextClass.instance.roomViewStore.isViewingCall(), + const isViewingCall = useEventEmitterState( + SdkContextClass.instance.roomViewStore, + UPDATE_EVENT, + () => SdkContextClass.instance.roomViewStore.isViewingCall() || isVideoRoom(room), ); // room