Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Consider cancelled verifications when mounting IncomingSasDialog #3123

Merged
merged 2 commits into from
Jun 20, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/components/views/dialogs/IncomingSasDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ export default class IncomingSasDialog extends React.Component {
this._fetchOpponentProfile();
}

componentWillMount() {
if (this.props.verifier.cancelled) {
console.log("Verifier was cancelled in the background.");
this.setState({phase: PHASE_CANCELLED});
}
}

turt2live marked this conversation as resolved.
Show resolved Hide resolved
componentWillUnmount() {
if (this.state.phase !== PHASE_CANCELLED && this.state.phase !== PHASE_VERIFIED) {
this.props.verifier.cancel('User cancel');
Expand Down