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:
parent
965539da2d
commit
ae0dba4e87
42 changed files with 81 additions and 58 deletions
|
@ -234,7 +234,7 @@ export default class MessageContextMenu extends React.Component<IProps, IState>
|
|||
|
||||
private viewInRoom = () => {
|
||||
dis.dispatch({
|
||||
action: 'view_room',
|
||||
action: Action.ViewRoom,
|
||||
event_id: this.props.mxEvent.getId(),
|
||||
highlighted: true,
|
||||
room_id: this.props.mxEvent.getRoomId(),
|
||||
|
|
|
@ -113,7 +113,7 @@ const SpaceContextMenu = ({ space, onFinished, ...props }: IProps) => {
|
|||
ev.stopPropagation();
|
||||
|
||||
defaultDispatcher.dispatch({
|
||||
action: 'view_room',
|
||||
action: Action.ViewRoom,
|
||||
room_id: space.roomId,
|
||||
forceTimeline: true,
|
||||
});
|
||||
|
|
|
@ -18,6 +18,7 @@ import React, { useCallback, useEffect, useState } from "react";
|
|||
import { MatrixEvent } from "matrix-js-sdk/src";
|
||||
import { ButtonEvent } from "../elements/AccessibleButton";
|
||||
import dis from '../../../dispatcher/dispatcher';
|
||||
import { Action } from "../../../dispatcher/actions";
|
||||
import { RoomPermalinkCreator } from "../../../utils/permalinks/Permalinks";
|
||||
import { copyPlaintext } from "../../../utils/strings";
|
||||
import { ChevronFace, ContextMenuTooltipButton } from "../../structures/ContextMenu";
|
||||
|
@ -48,7 +49,7 @@ const ThreadListContextMenu: React.FC<IProps> = ({ mxEvent, permalinkCreator, on
|
|||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
dis.dispatch({
|
||||
action: 'view_room',
|
||||
action: Action.ViewRoom,
|
||||
event_id: mxEvent.getId(),
|
||||
highlighted: true,
|
||||
room_id: mxEvent.getRoomId(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue