From 68973acaba856f175aaee862964986e00abfa752 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 (cherry picked from commit a008916697fe93ef575255598510abbdbb9f71de) (cherry picked from commit 8aa1637ce91d2e9f674972a2b96536e3a14fe7bb) (cherry picked from commit 269c9b4ad5018e392cf135a04d20b0a93a944172) (cherry picked from commit e42c57a9821261f0efaefcc7be36ae67c8044d2f) (cherry picked from commit d1ac2444a3224fb16806e3ecf1ba1f366a58f5e7) --- .../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 c0f49a15f243..c890087a0744 100644 --- a/platform/platform-impl/src/com/intellij/ide/gdpr/Agreements.kt +++ b/platform/platform-impl/src/com/intellij/ide/gdpr/Agreements.kt @@ -74,12 +74,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