mirror of
https://github.com/vector-im/element-web.git
synced 2025-12-08 19:01:43 +01:00
Ensure switching rooms does not wrongly focus timeline search (#29153)
This happened due to the focusRoomSearch param being stored for inactive rooms so it never got cleared Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
d3a6f34881
commit
b64471e4f6
@ -38,8 +38,6 @@ export interface IRightPanelCardStateStored {
|
||||
initialEventId?: string;
|
||||
isInitialEventHighlighted?: boolean;
|
||||
initialEventScrollIntoView?: boolean;
|
||||
// room summary card
|
||||
focusRoomSearch?: boolean;
|
||||
}
|
||||
|
||||
export interface IRightPanelCard {
|
||||
@ -84,7 +82,6 @@ export function convertCardToStore(panelState: IRightPanelCard): IRightPanelCard
|
||||
memberInfoEventId: !!state?.memberInfoEvent?.getId() ? state.memberInfoEvent.getId() : undefined,
|
||||
initialEventId: !!state?.initialEvent?.getId() ? state.initialEvent.getId() : undefined,
|
||||
memberId: !!state?.member?.userId ? state.member.userId : undefined,
|
||||
focusRoomSearch: state.focusRoomSearch,
|
||||
};
|
||||
|
||||
return { state: stateStored, phase: panelState.phase };
|
||||
@ -104,7 +101,6 @@ function convertStoreToCard(panelStateStore: IRightPanelCardStored, room: Room):
|
||||
: undefined,
|
||||
initialEvent: !!stateStored?.initialEventId ? room.findEventById(stateStored.initialEventId) : undefined,
|
||||
member: (!!stateStored?.memberId && room.getMember(stateStored.memberId)) || undefined,
|
||||
focusRoomSearch: stateStored?.focusRoomSearch,
|
||||
};
|
||||
|
||||
return { state: state, phase: panelStateStore.phase };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user