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:
Robin
2026-02-12 16:28:07 +00:00
committed by GitHub
parent 2ee6933cfd
commit 5094613180
4 changed files with 90 additions and 6 deletions
+1 -2
View File
@@ -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;