Fix RoomView::onSearchClick toggle behaviour (#11605)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/28788/head^2
Michael Telatynski 2023-09-13 20:23:33 +01:00 committed by GitHub
parent da1daa1b18
commit 237038aa56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 6 deletions

View File

@ -1784,12 +1784,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
}; };
private onSearchClick = (): void => { private onSearchClick = (): void => {
this.setState({ if (this.state.timelineRenderingType === TimelineRenderingType.Search) {
timelineRenderingType: this.onCancelSearchClick();
this.state.timelineRenderingType === TimelineRenderingType.Search } else {
? TimelineRenderingType.Room this.setState({
: TimelineRenderingType.Search, timelineRenderingType: TimelineRenderingType.Search,
}); });
}
}; };
private onCancelSearchClick = (): Promise<void> => { private onCancelSearchClick = (): Promise<void> => {