Add analytics for the ViewRoom action (#7666)
This commit is contained in:
parent
20e9d0c159
commit
0d6ef76605
53 changed files with 332 additions and 159 deletions
|
@ -34,6 +34,7 @@ import { useLocalEcho } from "../../../hooks/useLocalEcho";
|
|||
import dis from "../../../dispatcher/dispatcher";
|
||||
import { ROOM_SECURITY_TAB } from "../dialogs/RoomSettingsDialog";
|
||||
import { Action } from "../../../dispatcher/actions";
|
||||
import { ViewRoomPayload } from "../../../dispatcher/payloads/ViewRoomPayload";
|
||||
|
||||
interface IProps {
|
||||
room: Room;
|
||||
|
@ -267,9 +268,10 @@ const JoinRuleSettings = ({ room, promptUpgrade, aliasWarning, onError, beforeCh
|
|||
closeSettingsFn();
|
||||
|
||||
// switch to the new room in the background
|
||||
dis.dispatch({
|
||||
dis.dispatch<ViewRoomPayload>({
|
||||
action: Action.ViewRoom,
|
||||
room_id: roomId,
|
||||
_trigger: undefined, // other
|
||||
});
|
||||
|
||||
// open new settings on this tab
|
||||
|
|
|
@ -27,6 +27,7 @@ import dis from "../../../../../dispatcher/dispatcher";
|
|||
import { Action } from '../../../../../dispatcher/actions';
|
||||
import { replaceableComponent } from "../../../../../utils/replaceableComponent";
|
||||
import CopyableText from "../../../elements/CopyableText";
|
||||
import { ViewRoomPayload } from "../../../../../dispatcher/payloads/ViewRoomPayload";
|
||||
|
||||
interface IProps {
|
||||
roomId: string;
|
||||
|
@ -90,10 +91,12 @@ export default class AdvancedRoomSettingsTab extends React.Component<IProps, ISt
|
|||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
dis.dispatch({
|
||||
dis.dispatch<ViewRoomPayload>({
|
||||
action: Action.ViewRoom,
|
||||
room_id: this.state.oldRoomId,
|
||||
event_id: this.state.oldEventId,
|
||||
_trigger: "WebPredecessorSettings",
|
||||
_viaKeyboard: e.type !== "click",
|
||||
});
|
||||
this.props.closeSettingsFn();
|
||||
};
|
||||
|
|
|
@ -38,6 +38,7 @@ import Spinner from "../../../elements/Spinner";
|
|||
import { UserTab } from "../../../dialogs/UserSettingsDialog";
|
||||
import { OpenToTabPayload } from "../../../../../dispatcher/payloads/OpenToTabPayload";
|
||||
import { Action } from "../../../../../dispatcher/actions";
|
||||
import { ViewRoomPayload } from "../../../../../dispatcher/payloads/ViewRoomPayload";
|
||||
|
||||
interface IProps {
|
||||
closeSettingsFn(success: boolean): void;
|
||||
|
@ -113,9 +114,10 @@ const CommunityMigrator = ({ onFinished }) => {
|
|||
kind="primary_outline"
|
||||
onClick={() => {
|
||||
if (community.spaceId) {
|
||||
dis.dispatch({
|
||||
dis.dispatch<ViewRoomPayload>({
|
||||
action: Action.ViewRoom,
|
||||
room_id: community.spaceId,
|
||||
_trigger: undefined, // other
|
||||
});
|
||||
onFinished();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue