mirror of https://github.com/vector-im/riot-web
Fix emoji insertion in thread composer going to the main composer (#7895)
parent
85dc58a504
commit
4629d1e4f6
|
@ -899,17 +899,19 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||||
case Action.ComposerInsert: {
|
case Action.ComposerInsert: {
|
||||||
if (payload.composerType) break;
|
if (payload.composerType) break;
|
||||||
|
|
||||||
|
let timelineRenderingType: TimelineRenderingType = payload.timelineRenderingType;
|
||||||
if (this.state.timelineRenderingType === TimelineRenderingType.Search &&
|
if (this.state.timelineRenderingType === TimelineRenderingType.Search &&
|
||||||
payload.timelineRenderingType === TimelineRenderingType.Search
|
payload.timelineRenderingType === TimelineRenderingType.Search
|
||||||
) {
|
) {
|
||||||
// we don't have the composer rendered in this state, so bring it back first
|
// we don't have the composer rendered in this state, so bring it back first
|
||||||
await this.onCancelSearchClick();
|
await this.onCancelSearchClick();
|
||||||
|
timelineRenderingType = TimelineRenderingType.Room;
|
||||||
}
|
}
|
||||||
|
|
||||||
// re-dispatch to the correct composer
|
// re-dispatch to the correct composer
|
||||||
dis.dispatch<ComposerInsertPayload>({
|
dis.dispatch<ComposerInsertPayload>({
|
||||||
...(payload as ComposerInsertPayload),
|
...(payload as ComposerInsertPayload),
|
||||||
timelineRenderingType: TimelineRenderingType.Room,
|
timelineRenderingType,
|
||||||
composerType: this.state.editState ? ComposerType.Edit : ComposerType.Send,
|
composerType: this.state.editState ? ComposerType.Edit : ComposerType.Send,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue