add is video room or condition (#12374)
Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
parent
ab7f5dca74
commit
f23c992296
1 changed files with 5 additions and 2 deletions
|
@ -41,6 +41,7 @@ import { ViewRoomPayload } from "../../dispatcher/payloads/ViewRoomPayload";
|
||||||
import { Action } from "../../dispatcher/actions";
|
import { Action } from "../../dispatcher/actions";
|
||||||
import { CallStore, CallStoreEvent } from "../../stores/CallStore";
|
import { CallStore, CallStoreEvent } from "../../stores/CallStore";
|
||||||
import { calculateRoomVia } from "../../utils/permalinks/Permalinks";
|
import { calculateRoomVia } from "../../utils/permalinks/Permalinks";
|
||||||
|
import { isVideoRoom } from "../../utils/video-rooms";
|
||||||
|
|
||||||
export enum PlatformCallType {
|
export enum PlatformCallType {
|
||||||
ElementCall,
|
ElementCall,
|
||||||
|
@ -113,8 +114,10 @@ export const useRoomCall = (
|
||||||
const isConnectedToCall = useConnectionState(groupCall) === ConnectionState.Connected;
|
const isConnectedToCall = useConnectionState(groupCall) === ConnectionState.Connected;
|
||||||
const hasGroupCall = groupCall !== null;
|
const hasGroupCall = groupCall !== null;
|
||||||
const hasActiveCallSession = useParticipantCount(groupCall) > 0;
|
const hasActiveCallSession = useParticipantCount(groupCall) > 0;
|
||||||
const isViewingCall = useEventEmitterState(SdkContextClass.instance.roomViewStore, UPDATE_EVENT, () =>
|
const isViewingCall = useEventEmitterState(
|
||||||
SdkContextClass.instance.roomViewStore.isViewingCall(),
|
SdkContextClass.instance.roomViewStore,
|
||||||
|
UPDATE_EVENT,
|
||||||
|
() => SdkContextClass.instance.roomViewStore.isViewingCall() || isVideoRoom(room),
|
||||||
);
|
);
|
||||||
|
|
||||||
// room
|
// room
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue