Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/hooks/room/useRoomCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down