mirror of https://github.com/vector-im/riot-web
Fix Ctrl+F shortcut not working with minimised room summary card (#28223)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>pull/28230/head
parent
1fc0122523
commit
a9bea774f9
|
@ -80,6 +80,7 @@ export default class RightPanelStore extends ReadyWatchingStore {
|
||||||
if (this.currentCard.phase !== RightPanelPhases.RoomSummary) {
|
if (this.currentCard.phase !== RightPanelPhases.RoomSummary) {
|
||||||
this.setCard({ phase: RightPanelPhases.RoomSummary, state: { focusRoomSearch: true } });
|
this.setCard({ phase: RightPanelPhases.RoomSummary, state: { focusRoomSearch: true } });
|
||||||
}
|
}
|
||||||
|
this.show(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,8 @@ export interface IRightPanelCardStateStored {
|
||||||
initialEventId?: string;
|
initialEventId?: string;
|
||||||
isInitialEventHighlighted?: boolean;
|
isInitialEventHighlighted?: boolean;
|
||||||
initialEventScrollIntoView?: boolean;
|
initialEventScrollIntoView?: boolean;
|
||||||
|
// room summary card
|
||||||
|
focusRoomSearch?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IRightPanelCard {
|
export interface IRightPanelCard {
|
||||||
|
@ -85,6 +87,7 @@ export function convertCardToStore(panelState: IRightPanelCard): IRightPanelCard
|
||||||
memberInfoEventId: !!state?.memberInfoEvent?.getId() ? state.memberInfoEvent.getId() : undefined,
|
memberInfoEventId: !!state?.memberInfoEvent?.getId() ? state.memberInfoEvent.getId() : undefined,
|
||||||
initialEventId: !!state?.initialEvent?.getId() ? state.initialEvent.getId() : undefined,
|
initialEventId: !!state?.initialEvent?.getId() ? state.initialEvent.getId() : undefined,
|
||||||
memberId: !!state?.member?.userId ? state.member.userId : undefined,
|
memberId: !!state?.member?.userId ? state.member.userId : undefined,
|
||||||
|
focusRoomSearch: state.focusRoomSearch,
|
||||||
};
|
};
|
||||||
|
|
||||||
return { state: stateStored, phase: panelState.phase };
|
return { state: stateStored, phase: panelState.phase };
|
||||||
|
@ -105,6 +108,7 @@ function convertStoreToCard(panelStateStore: IRightPanelCardStored, room: Room):
|
||||||
: undefined,
|
: undefined,
|
||||||
initialEvent: !!stateStored?.initialEventId ? room.findEventById(stateStored.initialEventId) : undefined,
|
initialEvent: !!stateStored?.initialEventId ? room.findEventById(stateStored.initialEventId) : undefined,
|
||||||
member: (!!stateStored?.memberId && room.getMember(stateStored.memberId)) || undefined,
|
member: (!!stateStored?.memberId && room.getMember(stateStored.memberId)) || undefined,
|
||||||
|
focusRoomSearch: stateStored?.focusRoomSearch,
|
||||||
};
|
};
|
||||||
|
|
||||||
return { state: state, phase: panelStateStore.phase };
|
return { state: state, phase: panelStateStore.phase };
|
||||||
|
|
Loading…
Reference in New Issue