diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index c78f3324ef..c218ac2c7d 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -5119,8 +5119,6 @@ isa = PBXGroup; children = ( BDA583852B98B69C00732FDC /* Subscription */, - 858479C72B8792C900D156C1 /* History */, - EE7A92852AC6DE2500832A36 /* NetworkProtection */, 4B470ED4299C484B0086EBDC /* AppTrackingProtection */, F1CE42A71ECA0A520074A8DF /* Bookmarks */, 837774491F8E1ECE00E17A29 /* ContentBlocker */, diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5e6bbb8be3..6e56e60004 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,7 +33,7 @@ "location" : "https://github.com/DuckDuckGo/BrowserServicesKit", "state" : { "branch" : "jacek/report-on-toggle", - "revision" : "2f6f6db79616027b27fc0a0018136307062f71f2" + "revision" : "94328e6d65d33acea4b9cfeb5aecf2640010f7e8" } }, { @@ -123,7 +123,7 @@ "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { "branch" : "02-22-simple_report_screen", - "revision" : "2e8139b6dec68919e0f5eaea29b10f390eb71ad8" + "revision" : "505d19b0e79997db8c1789ed5dff534293f345a6" } }, { diff --git a/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift index 5a6c0584f9..1e3ff45de6 100644 --- a/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift @@ -51,14 +51,17 @@ final class PrivacyDashboardViewController: UIViewController { }, keyValueStoring: UserDefaults.standard) }() - private let toggleReportEvents = EventMapping { event, _, _, _ in + private let toggleReportEvents = EventMapping { event, _, parameters, _ in let domainEvent: Pixel.Event switch event { case .toggleReportDismiss: domainEvent = .toggleReportDismiss case .toggleReportDoNotSend: domainEvent = .toggleReportDoNotSend } - - Pixel.fire(pixel: domainEvent) + if let parameters { + Pixel.fire(pixel: domainEvent, withAdditionalParameters: parameters) + } else { + Pixel.fire(pixel: domainEvent) + } } init?(coder: NSCoder, @@ -244,9 +247,12 @@ extension PrivacyDashboardViewController: PrivacyDashboardToggleReportDelegate { func privacyDashboardController(_ privacyDashboardController: PrivacyDashboardController, didRequestSubmitToggleReportWithSource source: BrokenSiteReport.Source, - didOpenReportInfo: Bool) { + didOpenReportInfo: Bool, + toggleReportCounter: Int?) { do { - let report = try makeBrokenSiteReport(source: source, didOpenReportInfo: didOpenReportInfo) + let report = try makeBrokenSiteReport(source: source, + didOpenReportInfo: didOpenReportInfo, + toggleReportCounter: toggleReportCounter) try toggleProtectionsOffReporter.report(report, reportMode: .toggle) } catch { os_log("Failed to generate or send the broken site report: %@", type: .error, error.localizedDescription) @@ -278,7 +284,8 @@ extension PrivacyDashboardViewController { private func makeBrokenSiteReport(category: String = "", description: String = "", source: BrokenSiteReport.Source, - didOpenReportInfo: Bool = false) throws -> BrokenSiteReport { + didOpenReportInfo: Bool = false, + toggleReportCounter: Int? = nil) throws -> BrokenSiteReport { guard let privacyInfo = privacyDashboardController.privacyInfo, let breakageAdditionalInfo = breakageAdditionalInfo else { @@ -317,7 +324,8 @@ extension PrivacyDashboardViewController { model: UIDevice.current.model, errors: errors, httpStatusCodes: statusCodes, - didOpenReportInfo: didOpenReportInfo) + didOpenReportInfo: didOpenReportInfo, + toggleReportCounter: toggleReportCounter) } } diff --git a/DuckDuckGo/Theme+DesignSystem.swift b/DuckDuckGo/Theme+DesignSystem.swift index d496616332..611d866815 100644 --- a/DuckDuckGo/Theme+DesignSystem.swift +++ b/DuckDuckGo/Theme+DesignSystem.swift @@ -43,7 +43,7 @@ extension Theme { var ddgTextTintColor: UIColor { UIColor(designSystemColor: .textPrimary) } - var privacyDashboardWebviewBackgroundColor: UIColor { UIColor(designSystemColor: .surface) } + var privacyDashboardWebviewBackgroundColor: UIColor { UIColor(designSystemColor: .background) } var iconCellBorderColor: UIColor { UIColor(designSystemColor: .icons) }