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 {
}
}
private var ccpaHelper = CCPAHelper.shared
public func privacyPolicyHasBeenViewed() {
ccpaHelper.shownPrivacyNoticeBefore = true
initializeAllAdsIfNeeded()
}
......@@ -74,14 +77,11 @@ class TodayViewModel: ViewModelProtocol {
self.delegate?.showOnboarding(viewModel: self)
}
else {
let ccpaHelper = CCPAHelper.shared
if !ccpaHelper.shownPrivacyNoticeBefore {
if ccpaHelper.policyHasBeenUpdated {
if !self.ccpaHelper.shownPrivacyNoticeBefore {
if self.ccpaHelper.policyHasBeenUpdated {
analytics(log: .ANALYTICS_PRIVACY_POLICY_UPDATED)
}
self.delegate?.showPrivacyNotice(viewModel: self)
ccpaHelper.shownPrivacyNoticeBefore = true
}
else {
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