You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-13 08:02:38 +03:00
comments ftw
This commit is contained in:
@@ -24,6 +24,10 @@ export default class ToastContainer extends React.Component {
|
|||||||
super();
|
super();
|
||||||
this.state = {toasts: ToastStore.sharedInstance().getToasts()};
|
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);
|
ToastStore.sharedInstance().on('update', this._onToastStoreUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user