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

Commit

Permalink
Fix emoji insertion in thread composer going to the main composer (#7895
Browse files Browse the repository at this point in the history
)
  • Loading branch information
t3chguy authored Feb 24, 2022
1 parent 85dc58a commit 4629d1e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -899,17 +899,19 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
case Action.ComposerInsert: {
if (payload.composerType) break;

let timelineRenderingType: TimelineRenderingType = payload.timelineRenderingType;
if (this.state.timelineRenderingType === TimelineRenderingType.Search &&
payload.timelineRenderingType === TimelineRenderingType.Search
) {
// we don't have the composer rendered in this state, so bring it back first
await this.onCancelSearchClick();
timelineRenderingType = TimelineRenderingType.Room;
}

// re-dispatch to the correct composer
dis.dispatch<ComposerInsertPayload>({
...(payload as ComposerInsertPayload),
timelineRenderingType: TimelineRenderingType.Room,
timelineRenderingType,
composerType: this.state.editState ? ComposerType.Edit : ComposerType.Send,
});
break;
Expand Down

0 comments on commit 4629d1e

Please sign in to comment.