New User Onboarding Task List (#9083)
* Improve type of AccessibleButton to accurately represent available props * Update analytics events
This commit is contained in:
parent
45f6c32eb6
commit
1e4c336fed
32 changed files with 1261 additions and 22 deletions
|
@ -23,8 +23,12 @@ import { ClientEvent } from "matrix-js-sdk/src/client";
|
|||
import { logger } from "matrix-js-sdk/src/logger";
|
||||
import { MsgType } from "matrix-js-sdk/src/@types/event";
|
||||
import { M_LOCATION } from "matrix-js-sdk/src/@types/location";
|
||||
import {
|
||||
PermissionChanged as PermissionChangedEvent,
|
||||
} from "@matrix-org/analytics-events/types/typescript/PermissionChanged";
|
||||
|
||||
import { MatrixClientPeg } from './MatrixClientPeg';
|
||||
import { PosthogAnalytics } from "./PosthogAnalytics";
|
||||
import SdkConfig from './SdkConfig';
|
||||
import PlatformPeg from './PlatformPeg';
|
||||
import * as TextForEvent from './TextForEvent';
|
||||
|
@ -254,12 +258,23 @@ export const Notifier = {
|
|||
}
|
||||
|
||||
if (callback) callback();
|
||||
|
||||
PosthogAnalytics.instance.trackEvent<PermissionChangedEvent>({
|
||||
eventName: "PermissionChanged",
|
||||
permission: "Notification",
|
||||
granted: true,
|
||||
});
|
||||
dis.dispatch({
|
||||
action: "notifier_enabled",
|
||||
value: true,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
PosthogAnalytics.instance.trackEvent<PermissionChangedEvent>({
|
||||
eventName: "PermissionChanged",
|
||||
permission: "Notification",
|
||||
granted: false,
|
||||
});
|
||||
dis.dispatch({
|
||||
action: "notifier_enabled",
|
||||
value: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue