Cleanup timeout before unmount.
This commit is contained in:
parent
a33859326e
commit
7e062090de
2 changed files with 15 additions and 1 deletions
|
@ -204,6 +204,12 @@ export default class extends React.Component {
|
|||
this.unmounted = true;
|
||||
dis.unregister(this.dispatcherRef);
|
||||
this.context.matrixClient.removeListener('sync', this.onClientSync);
|
||||
this._afterComponentWillUnmount();
|
||||
}
|
||||
|
||||
// To be overridden by subclasses (e.g. MStickerBody) for further
|
||||
// cleanup after componentWillUnmount
|
||||
_afterComponentWillUnmount() {
|
||||
}
|
||||
|
||||
onAction(payload) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue