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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 81 additions and 58 deletions

View file

@ -22,6 +22,7 @@ import { RovingTabIndexWrapper } from "../../../accessibility/RovingTabIndex";
import AccessibleButton, { ButtonEvent } from "../../views/elements/AccessibleButton";
import dis from '../../../dispatcher/dispatcher';
import defaultDispatcher from '../../../dispatcher/dispatcher';
import { Action } from "../../../dispatcher/actions";
import { Key } from "../../../Keyboard";
import ActiveRoomObserver from "../../../ActiveRoomObserver";
import { _t } from "../../../languageHandler";
@ -235,7 +236,7 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
ev.preventDefault();
ev.stopPropagation();
dis.dispatch({
action: 'view_room',
action: Action.ViewRoom,
show_room_tile: true, // make sure the room is visible in the list
room_id: this.props.room.roomId,
clear_search: (ev && (ev.key === Key.ENTER || ev.key === Key.SPACE)),