Skip to content

Commit

Permalink
Fix Ctrl+F shortcut not working with minimised room summary card (#28223
Browse files Browse the repository at this point in the history
)

Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy authored Oct 17, 2024
1 parent 1fc0122 commit a9bea77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/stores/right-panel/RightPanelStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
if (this.currentCard.phase !== RightPanelPhases.RoomSummary) {
this.setCard({ phase: RightPanelPhases.RoomSummary, state: { focusRoomSearch: true } });
}
this.show(null);
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/stores/right-panel/RightPanelStoreIPanelState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export interface IRightPanelCardStateStored {
initialEventId?: string;
isInitialEventHighlighted?: boolean;
initialEventScrollIntoView?: boolean;
// room summary card
focusRoomSearch?: boolean;
}

export interface IRightPanelCard {
Expand Down Expand Up @@ -85,6 +87,7 @@ 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 @@ -105,6 +108,7 @@ 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 a9bea77

Please sign in to comment.