Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import { Alert } from "@vector-im/compound-web";
import { getThreepidsWithBindStatus } from "../../../../boundThreepids";
import { useMatrixClientContext } from "../../../../contexts/MatrixClientContext";
import { type ThirdPartyIdentifier } from "../../../../AddThreepid";
import SettingsStore from "../../../../settings/SettingsStore";
import { UIFeature } from "../../../../settings/UIFeature";
import { _t } from "../../../../languageHandler";
import SetIdServer from "../SetIdServer";
import { SettingsSubsection } from "../shared/SettingsSubsection";
Expand Down Expand Up @@ -124,8 +122,6 @@ export const DiscoverySettings: React.FC = () => {
})();
}, [client, getThreepidState]);

if (!SettingsStore.getValue(UIFeature.ThirdPartyID)) return null;

if (mustAgreeToTerms && requiredPolicyInfo.policiesAndServices) {
const intro = (
<Alert type="info" title={_t("settings|general|discovery_needs_terms_title")}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,21 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
}
}

let discoverySection;
if (SettingsStore.getValue(UIFeature.ThirdPartyID)) {
discoverySection = <DiscoverySettings />;
}

let privacySection;
if (discoverySection || posthogSection) {
privacySection = (
<SettingsSection heading={_t("common|privacy")}>
{discoverySection}
{posthogSection}
</SettingsSection>
);
}

return (
<SettingsTab>
{warning}
Expand All @@ -370,10 +385,7 @@ export default class SecurityUserSettingsTab extends React.Component<IProps, ISt
{secureBackup}
{eventIndex}
</SettingsSection>
<SettingsSection heading={_t("common|privacy")}>
<DiscoverySettings />
{posthogSection}
</SettingsSection>
{privacySection}
{advancedSection}
</SettingsTab>
);
Expand Down
Loading