You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Fix issue #16270 new rooms are titled 'Empty Room'. Signed-off-by: Dan Gwynne dangwynne1@gmail.com
This commit is contained in:
@@ -110,6 +110,11 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
|||||||
CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId),
|
CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId),
|
||||||
this.onCommunityUpdate,
|
this.onCommunityUpdate,
|
||||||
);
|
);
|
||||||
|
this.props.room.on("Room.name", this.onRoomNameUpdate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private onRoomNameUpdate = (room) => {
|
||||||
|
this.forceUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
private onNotificationUpdate = () => {
|
private onNotificationUpdate = () => {
|
||||||
@@ -150,6 +155,8 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
|||||||
CommunityPrototypeStore.getUpdateEventName(this.props.room?.roomId),
|
CommunityPrototypeStore.getUpdateEventName(this.props.room?.roomId),
|
||||||
this.onCommunityUpdate,
|
this.onCommunityUpdate,
|
||||||
);
|
);
|
||||||
|
prevProps.room.off("Room.name", this.onRoomNameUpdate);
|
||||||
|
this.props.room.on("Room.name", this.onRoomNameUpdate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,6 +178,7 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
|||||||
CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId),
|
CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId),
|
||||||
this.onCommunityUpdate,
|
this.onCommunityUpdate,
|
||||||
);
|
);
|
||||||
|
this.props.room.off("Room.name", this.onRoomNameUpdate);
|
||||||
}
|
}
|
||||||
defaultDispatcher.unregister(this.dispatcherRef);
|
defaultDispatcher.unregister(this.dispatcherRef);
|
||||||
this.notificationState.off(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate);
|
this.notificationState.off(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate);
|
||||||
|
|||||||
Reference in New Issue
Block a user