From 5405b732fd3574276c5f88c474add8aea1090ed4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 24 Feb 2022 16:52:15 +0000 Subject: [PATCH] Fix emoji insertion in thread composer going to the main composer --- src/components/structures/RoomView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomView.tsx b/src/components/structures/RoomView.tsx index 543ebeba50a..46f14a53cc3 100644 --- a/src/components/structures/RoomView.tsx +++ b/src/components/structures/RoomView.tsx @@ -899,17 +899,19 @@ export class RoomView extends React.Component { 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({ ...(payload as ComposerInsertPayload), - timelineRenderingType: TimelineRenderingType.Room, + timelineRenderingType, composerType: this.state.editState ? ComposerType.Edit : ComposerType.Send, }); break;