Put call on hold when transfer dialog is opened (#7669)

And take it off hold if the dialog is cancelled.

Also changes the onFinished signature of invitedialog which claimed
to return an array of strings but never did, so now it just returns
a boolean.
This commit is contained in:
David Baker 2022-01-28 17:05:57 +00:00 committed by GitHub
parent b04d2de313
commit 7c20eb9b74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 15 deletions

View file

@ -21,8 +21,6 @@ import { MatrixCall } from 'matrix-js-sdk/src/webrtc/call';
import { _t } from '../../../languageHandler';
import ContextMenu, { IProps as IContextMenuProps, MenuItem } from '../../structures/ContextMenu';
import CallHandler from '../../../CallHandler';
import InviteDialog, { KIND_CALL_TRANSFER } from '../dialogs/InviteDialog';
import Modal from '../../../Modal';
import { replaceableComponent } from "../../../utils/replaceableComponent";
interface IProps extends IContextMenuProps {
@ -52,10 +50,7 @@ export default class CallContextMenu extends React.Component<IProps> {
};
onTransferClick = () => {
Modal.createTrackedDialog(
'Transfer Call', '', InviteDialog, { kind: KIND_CALL_TRANSFER, call: this.props.call },
/*className=*/"mx_InviteDialog_transferWrapper", /*isPriority=*/false, /*isStatic=*/true,
);
CallHandler.instance.showTransferDialog(this.props.call);
this.props.onFinished();
};