Use .instance pattern
This commit is contained in:
parent
07eaee25d2
commit
a1ffd240e1
6 changed files with 14 additions and 19 deletions
|
@ -25,7 +25,7 @@ import SettingsStore from "../../../settings/SettingsStore";
|
|||
import { UIFeature } from "../../../settings/UIFeature";
|
||||
import CountlyAnalytics from "../../../CountlyAnalytics";
|
||||
import { replaceableComponent } from "../../../utils/replaceableComponent";
|
||||
import { getAnalytics, IWelcomeScreenLoad } from "../../../PosthogAnalytics";
|
||||
import { PosthogAnalytics, IWelcomeScreenLoad } from "../../../PosthogAnalytics";
|
||||
import LanguageSelector from "./LanguageSelector";
|
||||
|
||||
// translatable strings for Welcome pages
|
||||
|
@ -76,6 +76,6 @@ export default class Welcome extends React.PureComponent<IProps> {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
getAnalytics().trackAnonymousEvent<IWelcomeScreenLoad>("welcome_screen_load");
|
||||
PosthogAnalytics.instance.trackAnonymousEvent<IWelcomeScreenLoad>("welcome_screen_load");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ import { UIFeature } from "../../../../../settings/UIFeature";
|
|||
import { isE2eAdvancedPanelPossible } from "../../E2eAdvancedPanel";
|
||||
import CountlyAnalytics from "../../../../../CountlyAnalytics";
|
||||
import { replaceableComponent } from "../../../../../utils/replaceableComponent";
|
||||
import { getAnalytics } from "../../../../../PosthogAnalytics";
|
||||
import { PosthogAnalytics } from "../../../../../PosthogAnalytics";
|
||||
|
||||
export class IgnoredUser extends React.Component {
|
||||
static propTypes = {
|
||||
|
@ -107,7 +107,7 @@ export default class SecurityUserSettingsTab extends React.Component {
|
|||
_updateAnalytics = (checked) => {
|
||||
checked ? Analytics.enable() : Analytics.disable();
|
||||
CountlyAnalytics.instance.enable(/* anonymous = */ !checked);
|
||||
getAnalytics().updateAnonymityFromSettings(MatrixClientPeg.get().getUserId());
|
||||
PosthogAnalytics.instance.updateAnonymityFromSettings(MatrixClientPeg.get().getUserId());
|
||||
};
|
||||
|
||||
_onExportE2eKeysClicked = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue