Fix RoomView::onSearchClick toggle behaviour (#11605)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/28788/head^2
parent
da1daa1b18
commit
237038aa56
|
@ -1784,12 +1784,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
};
|
||||
|
||||
private onSearchClick = (): void => {
|
||||
this.setState({
|
||||
timelineRenderingType:
|
||||
this.state.timelineRenderingType === TimelineRenderingType.Search
|
||||
? TimelineRenderingType.Room
|
||||
: TimelineRenderingType.Search,
|
||||
});
|
||||
if (this.state.timelineRenderingType === TimelineRenderingType.Search) {
|
||||
this.onCancelSearchClick();
|
||||
} else {
|
||||
this.setState({
|
||||
timelineRenderingType: TimelineRenderingType.Search,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
private onCancelSearchClick = (): Promise<void> => {
|
||||
|
|
Loading…
Reference in New Issue