File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
src/components/views/elements Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -579,18 +579,21 @@ export default class AppTile extends React.Component<IProps, IState> {
579
579
: Container . Center ;
580
580
WidgetLayoutStore . instance . moveToContainer ( this . props . room , this . props . app , targetContainer ) ;
581
581
582
- // If the right panel has a timeline, but we're about to show the timeline in the main view, pop the right panel
583
- if (
584
- targetContainer === Container . Top &&
585
- RightPanelStore . instance . currentCardForRoom ( this . props . room . roomId ) . phase === RightPanelPhases . Timeline
586
- ) {
587
- RightPanelStore . instance . popCard ( this . props . room . roomId ) ;
588
- }
582
+ if ( targetContainer === Container . Top ) this . closeChatCardIfNeeded ( ) ;
589
583
} ;
590
584
591
585
private onMinimiseClicked = ( ) : void => {
592
586
if ( ! this . props . room ) return ; // ignore action - it shouldn't even be visible
593
587
WidgetLayoutStore . instance . moveToContainer ( this . props . room , this . props . app , Container . Right ) ;
588
+ this . closeChatCardIfNeeded ( ) ;
589
+ } ;
590
+
591
+ private closeChatCardIfNeeded = ( ) : void => {
592
+ if ( ! this . props . room ) return ; // ignore action - it shouldn't even be visible
593
+ // If the right panel has a timeline, but we're about to show the timeline in the main view, pop the right panel
594
+ if ( RightPanelStore . instance . currentCardForRoom ( this . props . room . roomId ) . phase === RightPanelPhases . Timeline ) {
595
+ RightPanelStore . instance . popCard ( this . props . room . roomId ) ;
596
+ }
594
597
} ;
595
598
596
599
private onContextMenuClick = ( ) : void => {
You can’t perform that action at this time.
0 commit comments