Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 6204ddd

Browse files
authored
Ensure timeline search results are visible even in video rooms (#96)
Signed-off-by: Michael Telatynski <[email protected]>
1 parent f28f1d9 commit 6204ddd

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/components/structures/RoomView.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2521,17 +2521,23 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
25212521
mx_RoomView_timeline_rr_enabled: this.state.showReadReceipts,
25222522
});
25232523

2524+
let { mainSplitContentType } = this.state;
2525+
if (this.state.search) {
2526+
// When in the middle of a search force the main split content type to timeline
2527+
mainSplitContentType = MainSplitContentType.Timeline;
2528+
}
2529+
25242530
const mainClasses = classNames("mx_RoomView", {
25252531
mx_RoomView_inCall: Boolean(activeCall),
2526-
mx_RoomView_immersive: this.state.mainSplitContentType !== MainSplitContentType.Timeline,
2532+
mx_RoomView_immersive: mainSplitContentType !== MainSplitContentType.Timeline,
25272533
});
25282534

25292535
const showChatEffects = SettingsStore.getValue("showChatEffects");
25302536

25312537
let mainSplitBody: JSX.Element | undefined;
25322538
let mainSplitContentClassName: string | undefined;
25332539
// Decide what to show in the main split
2534-
switch (this.state.mainSplitContentType) {
2540+
switch (mainSplitContentType) {
25352541
case MainSplitContentType.Timeline:
25362542
mainSplitContentClassName = "mx_MainSplit_timeline";
25372543
mainSplitBody = (
@@ -2595,7 +2601,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
25952601
let viewingCall = false;
25962602

25972603
// Simplify the header for other main split types
2598-
switch (this.state.mainSplitContentType) {
2604+
switch (mainSplitContentType) {
25992605
case MainSplitContentType.MaximisedWidget:
26002606
excludedRightPanelPhaseButtons = [];
26012607
onAppsClick = null;

0 commit comments

Comments
 (0)