From ac5c3b4c3d13714b86f0feb32a9430e5009ea571 Mon Sep 17 00:00:00 2001 From: Nikita Iarychenko Date: Tue, 18 Mar 2025 14:44:51 +0400 Subject: [PATCH] OPENIDE #123 Don't show dialog with statistics after accepting the user agreement --- .../platform-impl/src/com/intellij/ide/gdpr/Agreements.kt | 8 ++------ .../src/com/intellij/ide/gdpr/OpenIdeAgreements.kt | 6 ++++-- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/ide/gdpr/Agreements.kt b/platform/platform-impl/src/com/intellij/ide/gdpr/Agreements.kt index 1c8cc18795c2..f5ef39852aa8 100644 --- a/platform/platform-impl/src/com/intellij/ide/gdpr/Agreements.kt +++ b/platform/platform-impl/src/com/intellij/ide/gdpr/Agreements.kt @@ -72,12 +72,8 @@ fun showEndUserAndDataSharingAgreements(agreement: EndUserAgreement.Document) { isEnabled = false, action = { dialogWrapper -> EndUserAgreement.setAccepted(agreement) - if (ConsentOptions.needToShowUsageStatsConsent()) { - configureDataSharing(bundle) - } - else { - dialogWrapper.close(DialogWrapper.OK_EXIT_CODE) - } + acceptOpenIdeDataSharingAgreement() + dialogWrapper.close(DialogWrapper.OK_EXIT_CODE) } ) } diff --git a/platform/platform-impl/src/com/intellij/ide/gdpr/OpenIdeAgreements.kt b/platform/platform-impl/src/com/intellij/ide/gdpr/OpenIdeAgreements.kt index 316085c67525..3dcb354a9491 100644 --- a/platform/platform-impl/src/com/intellij/ide/gdpr/OpenIdeAgreements.kt +++ b/platform/platform-impl/src/com/intellij/ide/gdpr/OpenIdeAgreements.kt @@ -16,6 +16,8 @@ package com.intellij.ide.gdpr import com.intellij.ui.AppUIUtil fun acceptOpenIdeDataSharingAgreement() { - val dataSharingConsent = ConsentOptions.getInstance().getConsents(ConsentOptions.condUsageStatsConsent()).first[0] - AppUIUtil.saveConsents(listOf(dataSharingConsent.derive(true))) + if (ConsentOptions.needToShowUsageStatsConsent()) { + val dataSharingConsent = ConsentOptions.getInstance().getConsents(ConsentOptions.condUsageStatsConsent()).first[0] + AppUIUtil.saveConsents(listOf(dataSharingConsent.derive(true))) + } } \ No newline at end of file