Commit 3009c5ef by Demid Merzlyakov

CCPA flow fix: only make the CCPA request after the privacy policy has been viewed.

parent 4d5d2068
...@@ -63,7 +63,10 @@ class TodayViewModel: ViewModelProtocol { ...@@ -63,7 +63,10 @@ class TodayViewModel: ViewModelProtocol {
} }
} }
private var ccpaHelper = CCPAHelper.shared
public func privacyPolicyHasBeenViewed() { public func privacyPolicyHasBeenViewed() {
ccpaHelper.shownPrivacyNoticeBefore = true
initializeAllAdsIfNeeded() initializeAllAdsIfNeeded()
} }
...@@ -74,14 +77,11 @@ class TodayViewModel: ViewModelProtocol { ...@@ -74,14 +77,11 @@ class TodayViewModel: ViewModelProtocol {
self.delegate?.showOnboarding(viewModel: self) self.delegate?.showOnboarding(viewModel: self)
} }
else { else {
let ccpaHelper = CCPAHelper.shared if !self.ccpaHelper.shownPrivacyNoticeBefore {
if !ccpaHelper.shownPrivacyNoticeBefore { if self.ccpaHelper.policyHasBeenUpdated {
if ccpaHelper.policyHasBeenUpdated {
analytics(log: .ANALYTICS_PRIVACY_POLICY_UPDATED) analytics(log: .ANALYTICS_PRIVACY_POLICY_UPDATED)
} }
self.delegate?.showPrivacyNotice(viewModel: self) self.delegate?.showPrivacyNotice(viewModel: self)
ccpaHelper.shownPrivacyNoticeBefore = true
} }
else { else {
self.initializeAllAdsIfNeeded() self.initializeAllAdsIfNeeded()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment