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

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
pull/28192/head
Michael Telatynski 2024-09-30 14:50:17 +01:00 committed by GitHub
parent f28f1d998f
commit 4f391645e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 3 deletions

View File

@ -2521,9 +2521,15 @@ 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");
@ -2531,7 +2537,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
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 = (
@ -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;