Skip to content

Commit

Permalink
Only show DBP for US users
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayterDev committed Oct 31, 2023
1 parent f6b6876 commit 94a2ba3
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -328,12 +328,22 @@ final class MoreOptionsMenu: NSMenu {
#endif // NETWORK_PROTECTION

#if DBP
let dataBrokerProtectionItem = NSMenuItem(title: UserText.dataBrokerProtectionOptionsMenuItem,
action: #selector(openDataBrokerProtection),
keyEquivalent: "")
.targetting(self)
.withImage(NSImage(named: "BurnerWindowIcon2")) // PLACEHOLDER: Change it once we have the final icon
items.append(dataBrokerProtectionItem)
var regionCode: String?
if #available(macOS 13, *) {
regionCode = Locale.current.region?.identifier
} else {
regionCode = Locale.current.regionCode
}

// Only show Private Information Removal (DBP) for US based users
if (regionCode ?? "US") == "US" {
let dataBrokerProtectionItem = NSMenuItem(title: UserText.dataBrokerProtectionOptionsMenuItem,
action: #selector(openDataBrokerProtection),
keyEquivalent: "")
.targetting(self)
.withImage(NSImage(named: "BurnerWindowIcon2")) // PLACEHOLDER: Change it once we have the final icon
items.append(dataBrokerProtectionItem)
}
#endif // DBP

#if SUBSCRIPTION
Expand Down

0 comments on commit 94a2ba3

Please sign in to comment.