mirror of
https://github.com/vector-im/element-call.git
synced 2026-05-01 09:54:37 +00:00
move show footer logic to callViewModel
Also remove header prop. This is accesible via urlParams.
This commit is contained in:
@@ -93,7 +93,6 @@ interface Props {
|
||||
confineToRoom: boolean;
|
||||
preload: UrlParams["preload"];
|
||||
skipLobby: UrlParams["skipLobby"];
|
||||
header: HeaderStyle;
|
||||
rtcSession: MatrixRTCSession;
|
||||
joined: boolean;
|
||||
setJoined: (value: boolean) => void;
|
||||
@@ -107,7 +106,6 @@ export const GroupCallView: FC<Props> = ({
|
||||
confineToRoom,
|
||||
preload,
|
||||
skipLobby,
|
||||
header,
|
||||
rtcSession,
|
||||
joined,
|
||||
setJoined,
|
||||
@@ -182,6 +180,7 @@ export const GroupCallView: FC<Props> = ({
|
||||
perParticipantE2EE,
|
||||
returnToLobby,
|
||||
password: passwordFromUrl,
|
||||
header,
|
||||
} = useUrlParams();
|
||||
const e2eeSystem = useRoomEncryptionSystem(room.roomId);
|
||||
|
||||
@@ -463,7 +462,6 @@ export const GroupCallView: FC<Props> = ({
|
||||
rtcSession={rtcSession as MatrixRTCSession}
|
||||
matrixRoom={room}
|
||||
onLeft={onLeft}
|
||||
header={header}
|
||||
muteStates={muteStates}
|
||||
e2eeSystem={e2eeSystem}
|
||||
//otelGroupCallMembership={otelGroupCallMembership}
|
||||
|
||||
@@ -39,7 +39,6 @@ import { ReactionsSenderProvider } from "../reactions/useReactionsSender";
|
||||
import { useRoomEncryptionSystem } from "../e2ee/sharedKeyManagement";
|
||||
import { LivekitRoomAudioRenderer } from "../livekit/MatrixAudioRenderer";
|
||||
import { MediaDevicesContext } from "../MediaDevicesContext";
|
||||
import { HeaderStyle } from "../UrlParams";
|
||||
import { type MediaDevices as ECMediaDevices } from "../state/MediaDevices";
|
||||
import { initializeWidget } from "../widget";
|
||||
|
||||
@@ -131,7 +130,6 @@ function createInCallView(args: CreateInCallViewArgs = {}): RenderResult & {
|
||||
<RoomContext value={livekitRoom}>
|
||||
<InCallView
|
||||
client={client}
|
||||
header={HeaderStyle.Standard}
|
||||
rtcSession={rtcSession.asMockedSession()}
|
||||
muteStates={muteState}
|
||||
vm={vm}
|
||||
|
||||
@@ -171,7 +171,6 @@ export interface InCallViewProps {
|
||||
rtcSession: MatrixRTCSession;
|
||||
matrixRoom: MatrixRoom;
|
||||
muteStates: MuteStates;
|
||||
header: HeaderStyle;
|
||||
onShareClick: (() => void) | null;
|
||||
}
|
||||
|
||||
@@ -181,8 +180,6 @@ export const InCallView: FC<InCallViewProps> = ({
|
||||
matrixInfo,
|
||||
matrixRoom,
|
||||
muteStates,
|
||||
|
||||
header: headerStyle,
|
||||
onShareClick,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
@@ -206,7 +203,7 @@ export const InCallView: FC<InCallViewProps> = ({
|
||||
// Merge the refs so they can attach to the same element
|
||||
const containerRef = useMergedRefs(containerRef1, containerRef2);
|
||||
|
||||
const { showControls } = useUrlParams();
|
||||
const { showControls, header: headerStyle } = useUrlParams();
|
||||
|
||||
const muteAllAudio = useBehavior(muteAllAudio$);
|
||||
|
||||
@@ -565,14 +562,11 @@ export const InCallView: FC<InCallViewProps> = ({
|
||||
<SettingsButton key="settings" onClick={openSettings} />,
|
||||
);
|
||||
|
||||
const footerNotNeeded =
|
||||
showControls === false && headerStyle === HeaderStyle.None;
|
||||
const footer = (
|
||||
<InCallFooter
|
||||
ref={footerRef}
|
||||
asOverlay={windowMode === "flat"}
|
||||
// TODO this should be computed in the view model!
|
||||
showFooter={showFooter && !footerNotNeeded}
|
||||
showFooter={showFooter}
|
||||
showControls={showControls}
|
||||
showLogo={headerStyle !== HeaderStyle.None}
|
||||
showSettingsButton={headerStyle !== HeaderStyle.AppBar}
|
||||
|
||||
@@ -136,7 +136,6 @@ export const RoomPage: FC = () => {
|
||||
confineToRoom={confineToRoom}
|
||||
preload={preload}
|
||||
skipLobby={skipLobby || wasInWaitForInviteState.current}
|
||||
header={header}
|
||||
muteStates={muteStates}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user