You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Fix RoomTile subscribing to wrong event emitter for room name
This commit is contained in:
@@ -101,7 +101,7 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
|||||||
this.roomProps = EchoChamber.forRoom(this.props.room);
|
this.roomProps = EchoChamber.forRoom(this.props.room);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onRoomNameUpdate = (room) => {
|
private onRoomNameUpdate = (room: Room) => {
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
|
|||||||
);
|
);
|
||||||
this.notificationState.on(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate);
|
this.notificationState.on(NOTIFICATION_STATE_UPDATE, this.onNotificationUpdate);
|
||||||
this.roomProps.on(PROPERTY_UPDATED, this.onRoomPropertyUpdate);
|
this.roomProps.on(PROPERTY_UPDATED, this.onRoomPropertyUpdate);
|
||||||
this.roomProps.on("Room.name", this.onRoomNameUpdate);
|
this.props.room?.on("Room.name", this.onRoomNameUpdate);
|
||||||
CommunityPrototypeStore.instance.on(
|
CommunityPrototypeStore.instance.on(
|
||||||
CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId),
|
CommunityPrototypeStore.getUpdateEventName(this.props.room.roomId),
|
||||||
this.onCommunityUpdate,
|
this.onCommunityUpdate,
|
||||||
|
|||||||
Reference in New Issue
Block a user