Skip to content

Commit

Permalink
Brand configuration: Url Reporting #1149 (#1151)
Browse files Browse the repository at this point in the history
* Added brand configuration for Report Page.

* Did small changes.

Co-authored-by: Shahen Antonyan <[email protected]>
  • Loading branch information
shahenAnt and Shahen Antonyan authored Jun 19, 2020
1 parent 7a72f58 commit ab579e2
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Branding/Ghostery/Features.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,9 @@ extension Features.Telemetry {
return "https://anolysis-staging.privacy.ghostery.net"
}
}

extension Features.PrivacyDashboard.ReportPage {
public static var isEnabled: Bool {
return false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -430,15 +430,25 @@ extension PhotonActionSheetProtocol {
appDel.browserViewController.presentReportPageScreenFor(url: url)
}

let statisticAndReportPage = PhotonActionSheetItem(title: "", collectionItems: [whoTracksMeLink, reportPage])
let statisticAndReportPage: PhotonActionSheetItem = {
if Features.PrivacyDashboard.ReportPage.isEnabled {
return PhotonActionSheetItem(title: "", collectionItems: [whoTracksMeLink, reportPage])
} else {
return PhotonActionSheetItem(title: "", collectionItems: [whoTracksMeLink])
}
}()

if blocker.status == .Disabled {
return [menuActions, [statisticAndReportPage]]
}
if blocker.stats.total > 0 {
return [menuActions, [trackerInfo], [statisticAndReportPage]]
} else {
return [menuActions, [trackerInfo], [reportPage]]
if Features.PrivacyDashboard.ReportPage.isEnabled {
return [menuActions, [trackerInfo], [reportPage]]
} else {
return [menuActions, [trackerInfo]]
}
}
}

Expand Down
6 changes: 6 additions & 0 deletions Shared/Features.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ public struct Features {
public static var isPopupBlockerEnabled: Bool {
return true
}
public struct ReportPage {
public static var isEnabled: Bool {
return true
}
}
}

public struct News {
Expand Down Expand Up @@ -119,4 +124,5 @@ public struct Features {
return "https://proxy*.cliqz.foxyproxy.com"
}
}

}

0 comments on commit ab579e2

Please sign in to comment.