From 53f26d2744ad9b607e01ad13299c8e200190445f Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Thu, 7 Oct 2021 17:04:30 +0100 Subject: [PATCH] Keep room name up-to-date in settings dialog Signed-off-by: Paulo Pinto --- src/components/views/dialogs/RoomSettingsDialog.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/dialogs/RoomSettingsDialog.tsx b/src/components/views/dialogs/RoomSettingsDialog.tsx index b1c21d5044..a0f1c10884 100644 --- a/src/components/views/dialogs/RoomSettingsDialog.tsx +++ b/src/components/views/dialogs/RoomSettingsDialog.tsx @@ -59,6 +59,7 @@ export default class RoomSettingsDialog extends React.Component public componentDidMount() { this.dispatcherRef = dis.register(this.onAction); + MatrixClientPeg.get().on("Room.name", this.setRoomName); this.setRoomName(); } @@ -66,6 +67,8 @@ export default class RoomSettingsDialog extends React.Component if (this.dispatcherRef) { dis.unregister(this.dispatcherRef); } + + MatrixClientPeg.get().removeListener("Room.name", this.setRoomName); } private onAction = (payload): void => {