Fix room name not updating whilst summary card is open

pull/21833/head
Michael Telatynski 2021-05-19 17:12:31 +01:00
parent abd290938a
commit f52dc9a3ea
1 changed files with 8 additions and 1 deletions

View File

@ -45,6 +45,7 @@ import {ChevronFace, ContextMenuTooltipButton, useContextMenu} from "../../struc
import WidgetContextMenu from "../context_menus/WidgetContextMenu"; import WidgetContextMenu from "../context_menus/WidgetContextMenu";
import {useRoomMemberCount} from "../../../hooks/useRoomMembers"; import {useRoomMemberCount} from "../../../hooks/useRoomMembers";
import { Container, MAX_PINNED, WidgetLayoutStore } from "../../../stores/widgets/WidgetLayoutStore"; import { Container, MAX_PINNED, WidgetLayoutStore } from "../../../stores/widgets/WidgetLayoutStore";
import RoomName from "../elements/RoomName";
interface IProps { interface IProps {
room: Room; room: Room;
@ -249,7 +250,13 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, onClose }) => {
/> />
</div> </div>
<h2 title={room.name}>{ room.name }</h2> <RoomName room={room}>
{ name => (
<h2 title={name}>
{ name }
</h2>
)}
</RoomName>
<div className="mx_RoomSummaryCard_alias" title={alias}> <div className="mx_RoomSummaryCard_alias" title={alias}>
{ alias } { alias }
</div> </div>