mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 18:25:49 +03:00
comments ftw
This commit is contained in:
parent
f851f976e7
commit
086e43e584
1 changed files with 4 additions and 0 deletions
|
@ -24,6 +24,10 @@ export default class ToastContainer extends React.Component {
|
|||
super();
|
||||
this.state = {toasts: ToastStore.sharedInstance().getToasts()};
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue