Skip to content

Commit a9bea77

Browse files
authored
Fix Ctrl+F shortcut not working with minimised room summary card (#28223)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
1 parent 1fc0122 commit a9bea77

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/stores/right-panel/RightPanelStore.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
8080
if (this.currentCard.phase !== RightPanelPhases.RoomSummary) {
8181
this.setCard({ phase: RightPanelPhases.RoomSummary, state: { focusRoomSearch: true } });
8282
}
83+
this.show(null);
8384
}
8485
}
8586
}

src/stores/right-panel/RightPanelStoreIPanelState.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export interface IRightPanelCardStateStored {
4040
initialEventId?: string;
4141
isInitialEventHighlighted?: boolean;
4242
initialEventScrollIntoView?: boolean;
43+
// room summary card
44+
focusRoomSearch?: boolean;
4345
}
4446

4547
export interface IRightPanelCard {
@@ -85,6 +87,7 @@ export function convertCardToStore(panelState: IRightPanelCard): IRightPanelCard
8587
memberInfoEventId: !!state?.memberInfoEvent?.getId() ? state.memberInfoEvent.getId() : undefined,
8688
initialEventId: !!state?.initialEvent?.getId() ? state.initialEvent.getId() : undefined,
8789
memberId: !!state?.member?.userId ? state.member.userId : undefined,
90+
focusRoomSearch: state.focusRoomSearch,
8891
};
8992

9093
return { state: stateStored, phase: panelState.phase };
@@ -105,6 +108,7 @@ function convertStoreToCard(panelStateStore: IRightPanelCardStored, room: Room):
105108
: undefined,
106109
initialEvent: !!stateStored?.initialEventId ? room.findEventById(stateStored.initialEventId) : undefined,
107110
member: (!!stateStored?.memberId && room.getMember(stateStored.memberId)) || undefined,
111+
focusRoomSearch: stateStored?.focusRoomSearch,
108112
};
109113

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

0 commit comments

Comments
 (0)