diff --git a/res/css/views/voip/_CallView.scss b/res/css/views/voip/_CallView.scss index 5a58711fa5..5eff56eeaa 100644 --- a/res/css/views/voip/_CallView.scss +++ b/res/css/views/voip/_CallView.scss @@ -128,6 +128,8 @@ limitations under the License. padding-top: 20px; padding-bottom: 15px; color: $accent-fg-color; + user-select: none; + .mx_AccessibleButton_hasKind { padding: 0px; font-weight: bold; diff --git a/src/components/views/voip/CallPreview.tsx b/src/components/views/voip/CallPreview.tsx index 266c34083e..e34266616e 100644 --- a/src/components/views/voip/CallPreview.tsx +++ b/src/components/views/voip/CallPreview.tsx @@ -178,6 +178,13 @@ export default class CallPreview extends React.Component { }); }; + private onDoubleClick = (): void => { + dis.dispatch({ + action: "view_room", + room_id: this.state.primaryCall.roomId, + }); + }; + public render() { const pipMode = true; if (this.state.primaryCall) { @@ -185,6 +192,7 @@ export default class CallPreview extends React.Component { { ({ onStartMoving, onResize }) => ) => void; } -const onRoomAvatarClick = (roomId: string) => { - dis.dispatch({ - action: 'view_room', - room_id: roomId, - }); -}; - const onFullscreenClick = () => { dis.dispatch({ action: 'video_fullscreen', @@ -76,12 +68,10 @@ const CallViewHeaderControls: React.FC = ({ pipMode = false, }; const SecondaryCallInfo: React.FC<{ callRoom: Room }> = ({ callRoom }) => { return - onRoomAvatarClick(callRoom.roomId)}> - - - { _t("%(name)s on hold", { name: callRoom.name }) } - - + + + { _t("%(name)s on hold", { name: callRoom.name }) } + ; }; @@ -117,9 +107,7 @@ const CallViewHeader: React.FC = ({ className="mx_CallViewHeader" onMouseDown={onPipMouseDown} > - onRoomAvatarClick(roomId)}> - - +
{ callRoomName }
diff --git a/src/components/views/voip/PictureInPictureDragger.tsx b/src/components/views/voip/PictureInPictureDragger.tsx index 23a09b20d8..ceb0fc3315 100644 --- a/src/components/views/voip/PictureInPictureDragger.tsx +++ b/src/components/views/voip/PictureInPictureDragger.tsx @@ -42,6 +42,7 @@ interface IProps { className?: string; children: ({ onStartMoving, onResize }: IChildrenOptions) => React.ReactNode; draggable: boolean; + onDoubleClick?: () => void; } interface IState { @@ -216,6 +217,7 @@ export default class PictureInPictureDragger extends React.Component <> { this.props.children({