You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-12-05 15:22:09 +03:00
Add analytics for the ViewRoom action (#7666)
This commit is contained in:
committed by
GitHub
parent
20e9d0c159
commit
0d6ef76605
@@ -46,6 +46,8 @@ import BaseAvatar from "../avatars/BaseAvatar";
|
||||
import SpaceStore from "../../../stores/spaces/SpaceStore";
|
||||
import { roomContextDetailsText } from "../../../Rooms";
|
||||
import { Action } from "../../../dispatcher/actions";
|
||||
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
|
||||
import { ButtonEvent } from "../elements/AccessibleButton";
|
||||
|
||||
const AVATAR_SIZE = 30;
|
||||
|
||||
@@ -75,10 +77,12 @@ enum SendState {
|
||||
const Entry: React.FC<IEntryProps> = ({ room, event, matrixClient: cli, onFinished }) => {
|
||||
const [sendState, setSendState] = useState<SendState>(SendState.CanSend);
|
||||
|
||||
const jumpToRoom = () => {
|
||||
dis.dispatch({
|
||||
const jumpToRoom = (ev: ButtonEvent) => {
|
||||
dis.dispatch<ViewRoomPayload>({
|
||||
action: Action.ViewRoom,
|
||||
room_id: room.roomId,
|
||||
_trigger: "WebForwardShortcut",
|
||||
_viaKeyboard: ev.type !== "click",
|
||||
});
|
||||
onFinished(true);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user