You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
Correctly unregister group store listener when unmounting RoomList
This commit is contained in:
@@ -97,7 +97,7 @@ module.exports = React.createClass({
|
||||
if (tag[0] !== '+') {
|
||||
return;
|
||||
}
|
||||
this.groupStoreToken = GroupStore.registerListener(tag, () => {
|
||||
this._groupStoreToken = GroupStore.registerListener(tag, () => {
|
||||
// This group's rooms or members may have updated, update rooms for its tag
|
||||
this.updateVisibleRoomsForTag(dmRoomMap, tag);
|
||||
this.updateVisibleRooms();
|
||||
@@ -179,7 +179,9 @@ module.exports = React.createClass({
|
||||
}
|
||||
|
||||
// NB: GroupStore is not a Flux.Store
|
||||
if (this._groupStoreToken) {
|
||||
this._groupStoreToken.unregister();
|
||||
}
|
||||
|
||||
// cancel any pending calls to the rate_limited_funcs
|
||||
this._delayedRefreshRoomList.cancelPendingCall();
|
||||
|
||||
Reference in New Issue
Block a user