You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
Stop listening to account data when the stickerpicker is unmounted
Fixes https://github.com/vector-im/riot-web/issues/8994
This commit is contained in:
@@ -103,6 +103,9 @@ export default class Stickerpicker extends React.Component {
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
const client = MatrixClientPeg.get();
|
||||
if (client) client.removeListener('accountData', this._updateWidget);
|
||||
|
||||
window.removeEventListener('resize', this._onResize);
|
||||
if (this.dispatcherRef) {
|
||||
dis.unregister(this.dispatcherRef);
|
||||
|
||||
Reference in New Issue
Block a user