Merge pull request #2723 from matrix-org/travis/destate-stickerpicker
Stop listening to account data when the stickerpicker is unmountedpull/21833/head
commit
940ba51f9f
|
@ -103,6 +103,9 @@ export default class Stickerpicker extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
|
const client = MatrixClientPeg.get();
|
||||||
|
if (client) client.removeListener('accountData', this._updateWidget);
|
||||||
|
|
||||||
window.removeEventListener('resize', this._onResize);
|
window.removeEventListener('resize', this._onResize);
|
||||||
if (this.dispatcherRef) {
|
if (this.dispatcherRef) {
|
||||||
dis.unregister(this.dispatcherRef);
|
dis.unregister(this.dispatcherRef);
|
||||||
|
|
Loading…
Reference in New Issue