Simplifie things
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
adcdd72a08
commit
0851cf4415
2 changed files with 4 additions and 11 deletions
|
@ -232,11 +232,7 @@ export default class CallPreview extends React.Component<IProps, IState> {
|
||||||
call={this.state.primaryCall}
|
call={this.state.primaryCall}
|
||||||
secondaryCall={this.state.secondaryCall}
|
secondaryCall={this.state.secondaryCall}
|
||||||
pipMode={true}
|
pipMode={true}
|
||||||
dragCallbacks={{
|
onMouseDownOnHeader={this.onStartMoving}
|
||||||
onStartMoving: this.onStartMoving,
|
|
||||||
onMoving: this.onMoving,
|
|
||||||
onEndMoving: this.onEndMoving,
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
@ -50,11 +50,8 @@ interface IProps {
|
||||||
// need to control those things separately, so this is simpler.
|
// need to control those things separately, so this is simpler.
|
||||||
pipMode?: boolean;
|
pipMode?: boolean;
|
||||||
|
|
||||||
// Callbacks for dragging the CallView in PIP mode
|
// Used for dragging the PiP CallView
|
||||||
dragCallbacks?: {
|
onMouseDownOnHeader?: (event: React.MouseEvent) => void;
|
||||||
onStartMoving: (event: React.MouseEvent) => void;
|
|
||||||
onEndMoving: () => void;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IState {
|
interface IState {
|
||||||
|
@ -625,7 +622,7 @@ export default class CallView extends React.Component<IProps, IState> {
|
||||||
header = (
|
header = (
|
||||||
<div
|
<div
|
||||||
className="mx_CallView_header"
|
className="mx_CallView_header"
|
||||||
onMouseDown={this.props.dragCallbacks?.onStartMoving}
|
onMouseDown={this.props.onMouseDownOnHeader}
|
||||||
>
|
>
|
||||||
<AccessibleButton onClick={this.onRoomAvatarClick}>
|
<AccessibleButton onClick={this.onRoomAvatarClick}>
|
||||||
<RoomAvatar room={callRoom} height={32} width={32} />
|
<RoomAvatar room={callRoom} height={32} width={32} />
|
||||||
|
|
Loading…
Reference in a new issue