From 171b3ede763cf2e9b0a33661e6e68b919b40ee63 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 30 Oct 2020 14:27:14 +0000 Subject: [PATCH] improve comments --- src/Lifecycle.ts | 2 +- src/components/structures/MatrixChat.tsx | 6 +++--- .../views/settings/tabs/user/SecurityUserSettingsTab.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Lifecycle.ts b/src/Lifecycle.ts index 4870b85728..7469624f5c 100644 --- a/src/Lifecycle.ts +++ b/src/Lifecycle.ts @@ -583,7 +583,7 @@ export function logout(): void { if (!MatrixClientPeg.get()) return; if (!CountlyAnalytics.instance.disabled) { // user has logged out, fall back to anonymous - CountlyAnalytics.instance.enable(true); + CountlyAnalytics.instance.enable(/* anonymous = */ true); } if (MatrixClientPeg.get().isGuest()) { diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index c96a2ea6a0..f37da03e47 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -351,7 +351,7 @@ export default class MatrixChat extends React.PureComponent { if (SettingsStore.getValue("analyticsOptIn")) { Analytics.enable(); } - CountlyAnalytics.instance.enable(true); // anonymous + CountlyAnalytics.instance.enable(/* anonymous = */ true); } // TODO: [REACT-WARNING] Replace with appropriate lifecycle stage @@ -420,7 +420,7 @@ export default class MatrixChat extends React.PureComponent { dis.dispatch({action: "view_welcome_page"}); } } 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 @@ -760,7 +760,7 @@ export default class MatrixChat extends React.PureComponent { Analytics.enable(); } if (CountlyAnalytics.instance.canEnable()) { - CountlyAnalytics.instance.enable(false); + CountlyAnalytics.instance.enable(/* anonymous = */ false); } break; case 'reject_cookies': diff --git a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js index 50c55b6104..a0d9016ce2 100644 --- a/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js +++ b/src/components/views/settings/tabs/user/SecurityUserSettingsTab.js @@ -103,7 +103,7 @@ export default class SecurityUserSettingsTab extends React.Component { _updateAnalytics = (checked) => { checked ? Analytics.enable() : Analytics.disable(); - CountlyAnalytics.instance.enable(!checked); + CountlyAnalytics.instance.enable(/* anonymous = */ !checked); }; _onExportE2eKeysClicked = () => {