Skip to content

Commit

Permalink
Rework check for purchase allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
miasma13 committed Mar 22, 2024
1 parent c7ff61e commit e37ba00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions DuckDuckGo/NavigationBar/View/MoreOptionsMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,8 @@ final class MoreOptionsMenu: NSMenu {
var items: [NSMenuItem] = []

#if SUBSCRIPTION


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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ final class SubscriptionPagesUseSubscriptionFeature: Subfeature {
}

func getSubscriptionOptions(params: Any, original: WKScriptMessage) async throws -> Encodable? {
guard await NSApp.delegateTyped.subscriptionFeatureAvailability.isSubscriptionPurchaseAllowed else { return SubscriptionOptions.empty }
guard DefaultSubscriptionFeatureAvailability().isSubscriptionPurchaseAllowed else { return SubscriptionOptions.empty }

if SubscriptionPurchaseEnvironment.current == .appStore {
if #available(macOS 12.0, *) {
Expand Down

0 comments on commit e37ba00

Please sign in to comment.