Only switch to ThreadPanel when roomId changes
This commit is contained in:
parent
070f279ae7
commit
82d685e410
1 changed files with 1 additions and 1 deletions
|
@ -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>({
|
||||
|
|
Loading…
Reference in a new issue