Skip to content

Commit

Permalink
more returns
Browse files Browse the repository at this point in the history
  • Loading branch information
vegaro committed Jan 22, 2025
1 parent 9b906e9 commit 374d5d1
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ enum PurchaseInfo: Identifiable {
var productIdentifier: String {
switch self {
case let .subscription(info):
info.productIdentifier
return info.productIdentifier
case let .nonSubscription(transaction):
transaction.productIdentifier
return transaction.productIdentifier
}
}

var isActive: Bool {
switch self {
case let .subscription(info):
info.isActive
return info.isActive
case .nonSubscription:
false
return false
}
}

Expand All @@ -60,18 +60,18 @@ enum PurchaseInfo: Identifiable {
var willRenew: Bool {
switch self {
case let .subscription(info):
info.willRenew
return info.willRenew
case .nonSubscription:
false
return false
}
}

var purchaseDate: Date {
switch self {
case let .subscription(info):
info.purchaseDate
return info.purchaseDate
case let .nonSubscription(transaction):
transaction.purchaseDate
return transaction.purchaseDate
}
}

Expand Down

0 comments on commit 374d5d1

Please sign in to comment.