You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
Fix regression around replying to search results (#8035)
This commit is contained in:
committed by
GitHub
parent
1eb67047c9
commit
ceb2281d36
@@ -842,28 +842,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
});
|
||||
break;
|
||||
case 'reply_to_event':
|
||||
if (this.state.searchResults
|
||||
&& payload.event.getRoomId() === this.state.roomId
|
||||
&& !this.unmounted
|
||||
&& payload.context === TimelineRenderingType.Room) {
|
||||
if (!this.unmounted &&
|
||||
this.state.searchResults &&
|
||||
payload.event.getRoomId() === this.state.roomId &&
|
||||
payload.context === TimelineRenderingType.Search
|
||||
) {
|
||||
this.onCancelSearchClick();
|
||||
}
|
||||
break;
|
||||
case 'quote':
|
||||
if (this.state.searchResults) {
|
||||
const roomId = payload.event.getRoomId();
|
||||
if (roomId === this.state.roomId) {
|
||||
this.onCancelSearchClick();
|
||||
}
|
||||
|
||||
setImmediate(() => {
|
||||
dis.dispatch<ViewRoomPayload>({
|
||||
action: Action.ViewRoom,
|
||||
room_id: roomId,
|
||||
deferred_action: payload,
|
||||
metricsTrigger: "MessageSearch",
|
||||
});
|
||||
});
|
||||
// we don't need to re-dispatch as RoomViewStore knows to persist with context=Search also
|
||||
}
|
||||
break;
|
||||
case 'MatrixActions.sync':
|
||||
|
||||
Reference in New Issue
Block a user