Skip to content

Commit b64471e

Browse files
authored
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 <[email protected]>
1 parent d3a6f34 commit b64471e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/stores/right-panel/RightPanelStoreIPanelState.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ export interface IRightPanelCardStateStored {
3838
initialEventId?: string;
3939
isInitialEventHighlighted?: boolean;
4040
initialEventScrollIntoView?: boolean;
41-
// room summary card
42-
focusRoomSearch?: boolean;
4341
}
4442

4543
export interface IRightPanelCard {
@@ -84,7 +82,6 @@ export function convertCardToStore(panelState: IRightPanelCard): IRightPanelCard
8482
memberInfoEventId: !!state?.memberInfoEvent?.getId() ? state.memberInfoEvent.getId() : undefined,
8583
initialEventId: !!state?.initialEvent?.getId() ? state.initialEvent.getId() : undefined,
8684
memberId: !!state?.member?.userId ? state.member.userId : undefined,
87-
focusRoomSearch: state.focusRoomSearch,
8885
};
8986

9087
return { state: stateStored, phase: panelState.phase };
@@ -104,7 +101,6 @@ function convertStoreToCard(panelStateStore: IRightPanelCardStored, room: Room):
104101
: undefined,
105102
initialEvent: !!stateStored?.initialEventId ? room.findEventById(stateStored.initialEventId) : undefined,
106103
member: (!!stateStored?.memberId && room.getMember(stateStored.memberId)) || undefined,
107-
focusRoomSearch: stateStored?.focusRoomSearch,
108104
};
109105

110106
return { state: state, phase: panelStateStore.phase };

0 commit comments

Comments
 (0)