1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-05 15:22:09 +03:00

Add view_room to Action enum (#7203)

* Add ViewRoom action to Action enum

Signed-off-by: Renan <renancleyson.f@gmail.com>

* Change view_room occurrences to Action.ViewRoom

Signed-off-by: Renan <renancleyson.f@gmail.com>

* Add missing Action import
This commit is contained in:
Renan Cleyson
2021-11-25 17:49:43 -03:00
committed by GitHub
parent 965539da2d
commit ae0dba4e87
42 changed files with 81 additions and 58 deletions

View File

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