mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-20 05:51:08 +02:00
Invite Dialog don't show warning modals after unmount, it is jarring
This commit is contained in:
parent
97c6ee39d0
commit
3f10279e15
@ -351,6 +351,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||||||
|
|
||||||
_debounceTimer: NodeJS.Timeout = null; // actually number because we're in the browser
|
_debounceTimer: NodeJS.Timeout = null; // actually number because we're in the browser
|
||||||
_editorRef: any = null;
|
_editorRef: any = null;
|
||||||
|
private unmounted = false;
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -400,6 +401,10 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentWillUnmount() {
|
||||||
|
this.unmounted = true;
|
||||||
|
}
|
||||||
|
|
||||||
private onConsultFirstChange = (ev) => {
|
private onConsultFirstChange = (ev) => {
|
||||||
this.setState({consultFirst: ev.target.checked});
|
this.setState({consultFirst: ev.target.checked});
|
||||||
}
|
}
|
||||||
@ -1027,6 +1032,7 @@ export default class InviteDialog extends React.PureComponent<IInviteDialogProps
|
|||||||
failed.push(address);
|
failed.push(address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.unmounted) return;
|
||||||
|
|
||||||
if (failed.length > 0) {
|
if (failed.length > 0) {
|
||||||
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
|
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user