Only switch to ThreadPanel when roomId changes

This commit is contained in:
Germain Souquet 2021-09-24 11:06:07 +01:00
parent 070f279ae7
commit 82d685e410

View file

@ -197,7 +197,7 @@ export default class RightPanel extends React.Component<IProps, IState> {
};
private onAction = (payload: ActionPayload) => {
const isChangingRoom = payload.action === 'view_room';
const isChangingRoom = payload.action === 'view_room' && payload.room_id !== this.props.room.roomId;
const isViewingThread = this.state.phase === RightPanelPhases.ThreadView;
if (isChangingRoom && isViewingThread) {
dis.dispatch<SetRightPanelPhasePayload>({