Rename method to onRoomName
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
This commit is contained in:
parent
53f26d2744
commit
6aa325ed54
1 changed files with 4 additions and 4 deletions
|
@ -59,8 +59,8 @@ export default class RoomSettingsDialog extends React.Component<IProps, IState>
|
||||||
|
|
||||||
public componentDidMount() {
|
public componentDidMount() {
|
||||||
this.dispatcherRef = dis.register(this.onAction);
|
this.dispatcherRef = dis.register(this.onAction);
|
||||||
MatrixClientPeg.get().on("Room.name", this.setRoomName);
|
MatrixClientPeg.get().on("Room.name", this.onRoomName);
|
||||||
this.setRoomName();
|
this.onRoomName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public componentWillUnmount() {
|
public componentWillUnmount() {
|
||||||
|
@ -68,7 +68,7 @@ export default class RoomSettingsDialog extends React.Component<IProps, IState>
|
||||||
dis.unregister(this.dispatcherRef);
|
dis.unregister(this.dispatcherRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
MatrixClientPeg.get().removeListener("Room.name", this.setRoomName);
|
MatrixClientPeg.get().removeListener("Room.name", this.onRoomName);
|
||||||
}
|
}
|
||||||
|
|
||||||
private onAction = (payload): void => {
|
private onAction = (payload): void => {
|
||||||
|
@ -79,7 +79,7 @@ export default class RoomSettingsDialog extends React.Component<IProps, IState>
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private setRoomName = (): void => {
|
private onRoomName = (): void => {
|
||||||
this.setState({
|
this.setState({
|
||||||
roomName: MatrixClientPeg.get().getRoom(this.props.roomId).name,
|
roomName: MatrixClientPeg.get().getRoom(this.props.roomId).name,
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue