Use static modals for verification

Verification with cross-signing may requiring asking for your secret storage
passphrase, which is displayed in it's own modal on top of flows. For now while
verification takes in modals also, mark the verification ones as static so they
don't lose state when secret storage appears on top mid-flow.
This commit is contained in:
J. Ryan Stinnett 2019-12-13 13:55:26 +00:00
parent b7fe06706d
commit 3ac0deebab
6 changed files with 8 additions and 6 deletions

View file

@ -1492,7 +1492,7 @@ export default createReactClass({
const IncomingSasDialog = sdk.getComponent("views.dialogs.IncomingSasDialog"); const IncomingSasDialog = sdk.getComponent("views.dialogs.IncomingSasDialog");
Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, { Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, {
verifier, verifier,
}); }, null, /* priority = */ false, /* static = */ true);
}); });
} }
// Fire the tinter right on startup to ensure the default theme is applied // Fire the tinter right on startup to ensure the default theme is applied

View file

@ -99,7 +99,7 @@ export default createReactClass({
this.props.onFinished(true); this.props.onFinished(true);
} }
}, },
}); }, null, /* priority = */ false, /* static = */ true);
}, },
_onShareClicked: function() { _onShareClicked: function() {

View file

@ -59,7 +59,7 @@ export default createReactClass({
Modal.createTrackedDialog('Device Verify Dialog', '', DeviceVerifyDialog, { Modal.createTrackedDialog('Device Verify Dialog', '', DeviceVerifyDialog, {
userId: this.props.userId, userId: this.props.userId,
device: this.state.device, device: this.state.device,
}); }, null, /* priority = */ false, /* static = */ true);
}, },
onUnverifyClick: function() { onUnverifyClick: function() {

View file

@ -52,7 +52,7 @@ export default class MKeyVerificationRequest extends React.Component {
const verifier = MatrixClientPeg.get().acceptVerificationDM(this.props.mxEvent, verificationMethods.SAS); const verifier = MatrixClientPeg.get().acceptVerificationDM(this.props.mxEvent, verificationMethods.SAS);
Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, { Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, {
verifier, verifier,
}); }, null, /* priority = */ false, /* static = */ true);
}; };
_onRejectClicked = () => { _onRejectClicked = () => {

View file

@ -114,7 +114,7 @@ function verifyDevice(userId, device) {
Modal.createTrackedDialog('Device Verify Dialog', '', DeviceVerifyDialog, { Modal.createTrackedDialog('Device Verify Dialog', '', DeviceVerifyDialog, {
userId: userId, userId: userId,
device: device, device: device,
}); }, null, /* priority = */ false, /* static = */ true);
} }
function DeviceItem({userId, device}) { function DeviceItem({userId, device}) {

View file

@ -90,7 +90,9 @@ export default class VerificationRequestToast extends React.PureComponent {
const verifier = this.props.request.beginKeyVerification(verificationMethods.SAS); const verifier = this.props.request.beginKeyVerification(verificationMethods.SAS);
const IncomingSasDialog = sdk.getComponent('views.dialogs.IncomingSasDialog'); const IncomingSasDialog = sdk.getComponent('views.dialogs.IncomingSasDialog');
Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, {verifier}); Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, {
verifier,
}, null, /* priority = */ false, /* static = */ true);
}; };
render() { render() {