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

Fix room timeline search toggling behaviour edge case #11605

Merged
merged 1 commit into from
Sep 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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> => {
Expand Down
Loading