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

Ensure timeline search results are visible even in video rooms #96

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2521,17 +2521,23 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
mx_RoomView_timeline_rr_enabled: this.state.showReadReceipts,
});

let { mainSplitContentType } = this.state;
if (this.state.search) {
// When in the middle of a search force the main split content type to timeline
mainSplitContentType = MainSplitContentType.Timeline;
}

const mainClasses = classNames("mx_RoomView", {
mx_RoomView_inCall: Boolean(activeCall),
mx_RoomView_immersive: this.state.mainSplitContentType !== MainSplitContentType.Timeline,
mx_RoomView_immersive: mainSplitContentType !== MainSplitContentType.Timeline,
});

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

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

// Simplify the header for other main split types
switch (this.state.mainSplitContentType) {
switch (mainSplitContentType) {
case MainSplitContentType.MaximisedWidget:
excludedRightPanelPhaseButtons = [];
onAppsClick = null;
Expand Down
Loading