Skip to content

Commit

Permalink
Ensure switching rooms does not wrongly focus timeline search (#29153)
Browse files Browse the repository at this point in the history
This happened due to the focusRoomSearch param being stored for inactive rooms so it never got cleared

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy authored Jan 31, 2025
1 parent d3a6f34 commit b64471e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/stores/right-panel/RightPanelStoreIPanelState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export interface IRightPanelCardStateStored {
initialEventId?: string;
isInitialEventHighlighted?: boolean;
initialEventScrollIntoView?: boolean;
// room summary card
focusRoomSearch?: boolean;
}

export interface IRightPanelCard {
Expand Down Expand Up @@ -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 };
Expand All @@ -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 };
Expand Down

0 comments on commit b64471e

Please sign in to comment.