improve comments
parent
70fe26d163
commit
171b3ede76
|
@ -583,7 +583,7 @@ export function logout(): void {
|
||||||
if (!MatrixClientPeg.get()) return;
|
if (!MatrixClientPeg.get()) return;
|
||||||
if (!CountlyAnalytics.instance.disabled) {
|
if (!CountlyAnalytics.instance.disabled) {
|
||||||
// user has logged out, fall back to anonymous
|
// user has logged out, fall back to anonymous
|
||||||
CountlyAnalytics.instance.enable(true);
|
CountlyAnalytics.instance.enable(/* anonymous = */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MatrixClientPeg.get().isGuest()) {
|
if (MatrixClientPeg.get().isGuest()) {
|
||||||
|
|
|
@ -351,7 +351,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
if (SettingsStore.getValue("analyticsOptIn")) {
|
if (SettingsStore.getValue("analyticsOptIn")) {
|
||||||
Analytics.enable();
|
Analytics.enable();
|
||||||
}
|
}
|
||||||
CountlyAnalytics.instance.enable(true); // anonymous
|
CountlyAnalytics.instance.enable(/* anonymous = */ true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: [REACT-WARNING] Replace with appropriate lifecycle stage
|
// TODO: [REACT-WARNING] Replace with appropriate lifecycle stage
|
||||||
|
@ -420,7 +420,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
dis.dispatch({action: "view_welcome_page"});
|
dis.dispatch({action: "view_welcome_page"});
|
||||||
}
|
}
|
||||||
} else if (SettingsStore.getValue("analyticsOptIn")) {
|
} else if (SettingsStore.getValue("analyticsOptIn")) {
|
||||||
CountlyAnalytics.instance.enable(false);
|
CountlyAnalytics.instance.enable(/* anonymous = */ false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Note we don't catch errors from this: we catch everything within
|
// Note we don't catch errors from this: we catch everything within
|
||||||
|
@ -760,7 +760,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
Analytics.enable();
|
Analytics.enable();
|
||||||
}
|
}
|
||||||
if (CountlyAnalytics.instance.canEnable()) {
|
if (CountlyAnalytics.instance.canEnable()) {
|
||||||
CountlyAnalytics.instance.enable(false);
|
CountlyAnalytics.instance.enable(/* anonymous = */ false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'reject_cookies':
|
case 'reject_cookies':
|
||||||
|
|
|
@ -103,7 +103,7 @@ export default class SecurityUserSettingsTab extends React.Component {
|
||||||
|
|
||||||
_updateAnalytics = (checked) => {
|
_updateAnalytics = (checked) => {
|
||||||
checked ? Analytics.enable() : Analytics.disable();
|
checked ? Analytics.enable() : Analytics.disable();
|
||||||
CountlyAnalytics.instance.enable(!checked);
|
CountlyAnalytics.instance.enable(/* anonymous = */ !checked);
|
||||||
};
|
};
|
||||||
|
|
||||||
_onExportE2eKeysClicked = () => {
|
_onExportE2eKeysClicked = () => {
|
||||||
|
|
Loading…
Reference in New Issue