Use .instance pattern

This commit is contained in:
James Salter 2021-07-29 14:40:18 +01:00
parent 07eaee25d2
commit a1ffd240e1
6 changed files with 14 additions and 19 deletions

View file

@ -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 = () => {