Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Rename method to onRoomName
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Pinto <[email protected]>
  • Loading branch information
psrpinto committed Oct 7, 2021
1 parent 53f26d2 commit 6aa325e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/views/dialogs/RoomSettingsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ export default class RoomSettingsDialog extends React.Component<IProps, IState>

public componentDidMount() {
this.dispatcherRef = dis.register(this.onAction);
MatrixClientPeg.get().on("Room.name", this.setRoomName);
this.setRoomName();
MatrixClientPeg.get().on("Room.name", this.onRoomName);
this.onRoomName();
}

public componentWillUnmount() {
if (this.dispatcherRef) {
dis.unregister(this.dispatcherRef);
}

MatrixClientPeg.get().removeListener("Room.name", this.setRoomName);
MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
}

private onAction = (payload): void => {
Expand All @@ -79,7 +79,7 @@ export default class RoomSettingsDialog extends React.Component<IProps, IState>
}
};

private setRoomName = (): void => {
private onRoomName = (): void => {
this.setState({
roomName: MatrixClientPeg.get().getRoom(this.props.roomId).name,
});
Expand Down

0 comments on commit 6aa325e

Please sign in to comment.