bugfix: fix in-reply-to previews not disappearing when swapping rooms (#9278)
* bugfix: fix in-reply-to previews not disappearing when swapping rooms This was caused by the fix for another issue: - https://github.com/vector-im/element-web/issues/21462 Both bugs are now fixed with cypress regression tests. * Linting * Ensure the reply-to reappears when you click back * Add jest test for replyTo in RVS * Linting
This commit is contained in:
parent
8d9e5237fd
commit
a3133fa907
3 changed files with 84 additions and 2 deletions
|
@ -337,8 +337,9 @@ export class RoomViewStore extends Store<ActionPayload> {
|
|||
// Allow being given an event to be replied to when switching rooms but sanity check its for this room
|
||||
if (payload.replyingToEvent?.getRoomId() === payload.room_id) {
|
||||
newState.replyingToEvent = payload.replyingToEvent;
|
||||
} else if (this.state.roomId === payload.room_id) {
|
||||
// if the room isn't being changed, e.g visiting a permalink then maintain replyingToEvent
|
||||
} else if (this.state.replyingToEvent?.getRoomId() === payload.room_id) {
|
||||
// if the reply-to matches the desired room, e.g visiting a permalink then maintain replyingToEvent
|
||||
// See https://github.com/vector-im/element-web/issues/21462
|
||||
newState.replyingToEvent = this.state.replyingToEvent;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue