Skip to content

Commit

Permalink
Revert "Hide PrivacyPro when using App Store and no products are found"
Browse files Browse the repository at this point in the history
This reverts commit 028f34f.
  • Loading branch information
miasma13 committed Mar 22, 2024
1 parent 028f34f commit 948acec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
14 changes: 2 additions & 12 deletions DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -337,14 +337,9 @@ final class MoreOptionsMenu: NSMenu {
var items: [NSMenuItem] = []

#if SUBSCRIPTION
let subscriptionFeatureAvailability = DefaultSubscriptionFeatureAvailability()

if subscriptionFeatureAvailability.isFeatureAvailable {
switch (SubscriptionPurchaseEnvironment.current, SubscriptionPurchaseEnvironment.canPurchase) {
case (.appStore, false): return []
default: break
}
}

Check failure on line 341 in DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Limit vertical whitespace to a single empty line; currently 2 (vertical_whitespace)
let subscriptionFeatureAvailability = DefaultSubscriptionFeatureAvailability()
#endif

#if NETWORK_PROTECTION
Expand Down Expand Up @@ -442,11 +437,6 @@ final class MoreOptionsMenu: NSMenu {

#if SUBSCRIPTION
private func makeInactiveSubscriptionItems() -> [NSMenuItem] {
switch (SubscriptionPurchaseEnvironment.current, SubscriptionPurchaseEnvironment.canPurchase) {
case (.appStore, false): return []
default: break
}

let privacyProItem = NSMenuItem(title: UserText.subscriptionOptionsMenuItem,
action: #selector(openSubscriptionPurchasePage(_:)),
keyEquivalent: "")
Expand Down
8 changes: 2 additions & 6 deletions DuckDuckGo/Preferences/Model/PreferencesSection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@ struct PreferencesSection: Hashable, Identifiable {

#if SUBSCRIPTION
if DefaultSubscriptionFeatureAvailability().isFeatureAvailable {
switch (SubscriptionPurchaseEnvironment.current, SubscriptionPurchaseEnvironment.canPurchase) {
case (.appStore, false): break
default:
let subscriptionPanes: [PreferencePaneIdentifier] = [.subscription]
sections.insert(.init(id: .privacyPro, panes: subscriptionPanes), at: 1)
}
let subscriptionPanes: [PreferencePaneIdentifier] = [.subscription]
sections.insert(.init(id: .privacyPro, panes: subscriptionPanes), at: 1)
}
#endif

Expand Down

0 comments on commit 948acec

Please sign in to comment.