mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 15:19:39 +03:00
remove RoomViewStore listener from MatrixChat on unmount
... to avoid spurious warnings from the tests.
This commit is contained in:
parent
cb38ebed39
commit
1ea9ed5d8c
1 changed files with 2 additions and 1 deletions
|
@ -186,7 +186,7 @@ module.exports = React.createClass({
|
|||
componentWillMount: function() {
|
||||
SdkConfig.put(this.props.config);
|
||||
|
||||
RoomViewStore.addListener(this._onRoomViewStoreUpdated);
|
||||
this._roomViewStoreToken = RoomViewStore.addListener(this._onRoomViewStoreUpdated);
|
||||
this._onRoomViewStoreUpdated();
|
||||
|
||||
if (!UserSettingsStore.getLocalSetting('analyticsOptOut', false)) Analytics.enable();
|
||||
|
@ -295,6 +295,7 @@ module.exports = React.createClass({
|
|||
UDEHandler.stopListening();
|
||||
window.removeEventListener("focus", this.onFocus);
|
||||
window.removeEventListener('resize', this.handleResize);
|
||||
this._roomViewStoreToken.remove();
|
||||
},
|
||||
|
||||
componentDidUpdate: function() {
|
||||
|
|
Loading…
Reference in a new issue