1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-17 17:42:41 +03:00

Merge pull request #3943 from matrix-org/dbkr/kill_lingering_verification_toast

Stop rogue verification toast if you verify during login
This commit is contained in:
David Baker
2020-01-27 11:17:55 +00:00
committed by GitHub
2 changed files with 11 additions and 2 deletions

View File

@@ -23,9 +23,11 @@ export default class ToastContainer extends React.Component {
constructor() {
super();
this.state = {toasts: ToastStore.sharedInstance().getToasts()};
}
componentDidMount() {
// Start listening here rather than in componentDidMount because
// toasts may dismiss themselves in their didMount if they find
// they're already irrelevant by the time they're mounted, and
// our own componentDidMount is too late.
ToastStore.sharedInstance().on('update', this._onToastStoreUpdate);
}