mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-10 01:01:45 +00:00
Only switch to ThreadPanel when roomId changes
This commit is contained in:
@@ -197,7 +197,7 @@ export default class RightPanel extends React.Component<IProps, IState> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private onAction = (payload: ActionPayload) => {
|
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;
|
const isViewingThread = this.state.phase === RightPanelPhases.ThreadView;
|
||||||
if (isChangingRoom && isViewingThread) {
|
if (isChangingRoom && isViewingThread) {
|
||||||
dis.dispatch<SetRightPanelPhasePayload>({
|
dis.dispatch<SetRightPanelPhasePayload>({
|
||||||
|
|||||||
Reference in New Issue
Block a user