Remove Piwik support (#8835)
* Remove all mentions of Piwik * Kill off all consumer of the old Piwik Analytics module * Simplify ModalManager interface * i18n * Attempt to fix old e2e tests * Remove unused component * Iterate PR
This commit is contained in:
parent
7d14d15ba6
commit
3c5c2bef6d
142 changed files with 446 additions and 1412 deletions
|
@ -22,7 +22,6 @@ import { logger } from "matrix-js-sdk/src/logger";
|
|||
import { _t } from "../../../../../languageHandler";
|
||||
import { MatrixClientPeg } from "../../../../../MatrixClientPeg";
|
||||
import AccessibleButton from "../../../elements/AccessibleButton";
|
||||
import Analytics from "../../../../../Analytics";
|
||||
import dis from "../../../../../dispatcher/dispatcher";
|
||||
import { SettingLevel } from "../../../../../settings/SettingLevel";
|
||||
import SecureBackupPanel from "../../SecureBackupPanel";
|
||||
|
@ -110,10 +109,6 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
MatrixClientPeg.get().removeListener(RoomEvent.MyMembership, this.onMyMembership);
|
||||
}
|
||||
|
||||
private updateAnalytics = (checked: boolean): void => {
|
||||
checked ? Analytics.enable() : Analytics.disable();
|
||||
};
|
||||
|
||||
private onMyMembership = (room: Room, membership: string): void => {
|
||||
if (room.isSpaceRoom()) {
|
||||
return;
|
||||
|
@ -295,16 +290,12 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
}
|
||||
|
||||
let privacySection;
|
||||
if (Analytics.canEnable() || PosthogAnalytics.instance.isEnabled()) {
|
||||
if (PosthogAnalytics.instance.isEnabled()) {
|
||||
const onClickAnalyticsLearnMore = () => {
|
||||
if (PosthogAnalytics.instance.isEnabled()) {
|
||||
showAnalyticsLearnMoreDialog({
|
||||
primaryButton: _t("Okay"),
|
||||
hasCancel: false,
|
||||
});
|
||||
} else {
|
||||
Analytics.showDetailsModal();
|
||||
}
|
||||
showAnalyticsLearnMoreDialog({
|
||||
primaryButton: _t("Okay"),
|
||||
hasCancel: false,
|
||||
});
|
||||
};
|
||||
privacySection = <React.Fragment>
|
||||
<div className="mx_SettingsTab_heading">{ _t("Privacy") }</div>
|
||||
|
@ -321,15 +312,11 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
|
|||
</AccessibleButton>
|
||||
</p>
|
||||
</div>
|
||||
{
|
||||
PosthogAnalytics.instance.isEnabled() ?
|
||||
<SettingsFlag name="pseudonymousAnalyticsOptIn"
|
||||
level={SettingLevel.ACCOUNT}
|
||||
onChange={this.updateAnalytics} /> :
|
||||
<SettingsFlag name="analyticsOptIn"
|
||||
level={SettingLevel.DEVICE}
|
||||
onChange={this.updateAnalytics} />
|
||||
}
|
||||
{ PosthogAnalytics.instance.isEnabled() && (
|
||||
<SettingsFlag
|
||||
name="pseudonymousAnalyticsOptIn"
|
||||
level={SettingLevel.ACCOUNT} />
|
||||
) }
|
||||
</div>
|
||||
</React.Fragment>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue