Skip to content

Commit

Permalink
Toggle reports limiter (#3005)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1163321984198618/1207430232012866/f

Description:
Implement logic to limit the number of times users see the opt-in prompts for simplified toggle reports to reduce potential annoyance.
  • Loading branch information
jaceklyp authored Jun 28, 2024
1 parent e791af2 commit 4e559d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9858,7 +9858,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 162.0.0;
version = 163.0.0;
};
};
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "bd75e8eff671451c83522776bdd020c250fa97a4",
"version" : "162.0.0"
"revision" : "a51fed4db0c332cd4f02eafca2d9c7a178c0829a",
"version" : "163.0.0"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,8 @@ extension TabViewController {
}

private func onToggleProtectionAction(forDomain domain: String, isProtected: Bool) {
let config = ContentBlocking.shared.privacyConfigurationManager.privacyConfig
if isProtected && ToggleReportsFeature(privacyConfiguration: config).isEnabled {
let manager = ToggleReportsManager(feature: ToggleReportsFeature(manager: ContentBlocking.shared.privacyConfigurationManager))
if isProtected && manager.shouldShowToggleReport {
delegate?.tab(self, didRequestToggleReportWithCompletionHandler: { [weak self] didSendReport in
self?.togglePrivacyProtection(domain: domain, didSendReport: didSendReport)
})
Expand Down

0 comments on commit 4e559d6

Please sign in to comment.