Skip to content

Commit

Permalink
Ensure timeline search results are visible even in video rooms (#96)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
t3chguy authored Sep 30, 2024
1 parent f28f1d9 commit 4f39164
Showing 1 changed file with 9 additions and 3 deletions.
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

0 comments on commit 4f39164

Please sign in to comment.