add is video room or condition (#12374)

Signed-off-by: Timo K <toger5@hotmail.de>
pull/28217/head
Timo 2024-03-27 17:10:18 +01:00 committed by GitHub
parent ab7f5dca74
commit f23c992296
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -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