@@ -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