@@ -2515,17 +2515,23 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
25152515 mx_RoomView_timeline_rr_enabled : this . state . showReadReceipts ,
25162516 } ) ;
25172517
2518+ let { mainSplitContentType } = this . state ;
2519+ if ( this . state . search ) {
2520+ // When in the middle of a search force the main split content type to timeline
2521+ mainSplitContentType = MainSplitContentType . Timeline ;
2522+ }
2523+
25182524 const mainClasses = classNames ( "mx_RoomView" , {
25192525 mx_RoomView_inCall : Boolean ( activeCall ) ,
2520- mx_RoomView_immersive : this . state . mainSplitContentType !== MainSplitContentType . Timeline ,
2526+ mx_RoomView_immersive : mainSplitContentType !== MainSplitContentType . Timeline ,
25212527 } ) ;
25222528
25232529 const showChatEffects = SettingsStore . getValue ( "showChatEffects" ) ;
25242530
25252531 let mainSplitBody : JSX . Element | undefined ;
25262532 let mainSplitContentClassName : string | undefined ;
25272533 // Decide what to show in the main split
2528- switch ( this . state . mainSplitContentType ) {
2534+ switch ( mainSplitContentType ) {
25292535 case MainSplitContentType . Timeline :
25302536 mainSplitContentClassName = "mx_MainSplit_timeline" ;
25312537 mainSplitBody = (
@@ -2589,7 +2595,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
25892595 let viewingCall = false ;
25902596
25912597 // Simplify the header for other main split types
2592- switch ( this . state . mainSplitContentType ) {
2598+ switch ( mainSplitContentType ) {
25932599 case MainSplitContentType . MaximisedWidget :
25942600 excludedRightPanelPhaseButtons = [ ] ;
25952601 onAppsClick = null ;
0 commit comments