OPENIDE #123 Don't show dialog with statistics after accepting the user agreement

This commit is contained in:
Nikita Iarychenko
2025-03-18 14:44:51 +04:00
parent d44792dbee
commit ac5c3b4c3d
2 changed files with 6 additions and 8 deletions

View File

@@ -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)
}
)
}

View File

@@ -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)))
}
}