Merge pull request #4750 from matrix-org/travis/room-list/leak

Add some resource leak protection to new room list badges
This commit is contained in:
Travis Ralston 2020-06-11 12:33:11 -06:00 committed by GitHub
commit 2e04414331
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -84,6 +84,10 @@ export default class RoomSublist2 extends React.Component<IProps, IState> {
this.state.notificationState.setRooms(this.props.rooms);
}
public componentWillUnmount() {
this.state.notificationState.destroy();
}
private onAddRoom = (e) => {
e.stopPropagation();
if (this.props.onAddRoom) this.props.onAddRoom();