Avoid showing two chat timelines side by side after a call (#32484)
* Avoid showing two chat timelines side by side after a call In certain situations you could still end up with the chat timeline visible in the right panel in addition to the main split. For instance if you are in a call, open the chat panel, then leave the call while looking at another room, the chat panel would remain open upon navigating back to the original room. * Avoid using flushPromises in tests
This commit is contained in:
@@ -647,13 +647,12 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
};
|
||||
|
||||
if (
|
||||
this.state.mainSplitContentType !== MainSplitContentType.Timeline &&
|
||||
newState.mainSplitContentType === MainSplitContentType.Timeline &&
|
||||
this.context.rightPanelStore.isOpen &&
|
||||
this.context.rightPanelStore.currentCard.phase === RightPanelPhases.Timeline &&
|
||||
this.context.rightPanelStore.roomPhaseHistory.some((card) => card.phase === RightPanelPhases.Timeline)
|
||||
) {
|
||||
// We're returning to the main timeline, so hide the right panel timeline
|
||||
// The main split shows the main timeline, so hide the right panel timeline
|
||||
this.context.rightPanelStore.setCard({ phase: RightPanelPhases.RoomSummary });
|
||||
this.context.rightPanelStore.togglePanel(this.state.roomId ?? null);
|
||||
newState.showRightPanel = false;
|
||||
|
||||
Reference in New Issue
Block a user