[Customer Center] Promotional Offers support#3968
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
d7ef0b6 to
901e975
Compare
901e975 to
181e73b
Compare
181e73b to
76b9e6a
Compare
76b9e6a to
f8b3f67
Compare
f8b3f67 to
e86e19c
Compare
e86e19c to
bf7e1e0
Compare
bf7e1e0 to
9c62db1
Compare
9c62db1 to
76decce
Compare
JayShortway
left a comment
There was a problem hiding this comment.
Looks good! I like the LoadPromotionalOfferUseCase! Just had a very minor comment. I'll leave approval to someone with more context.
|
@JayShortway @tonidero I am changing |
tonidero
left a comment
There was a problem hiding this comment.
Left some comments but nothing blocking! I think we can merge this 👍
| .active | ||
| .values | ||
| .lazy | ||
| .filter { $0.store == .appStore } |
There was a problem hiding this comment.
[not for this PR] I was thinking, if the user has a purchase in a different store, we could probably still get it and display whatever information is available in the "no_active" page I guess but nothing to do here right now.
There was a problem hiding this comment.
good point, will take notes of that
| } | ||
|
|
||
| do { | ||
| let result = try await Purchases.shared.purchase(product: product, promotionalOffer: promotionalOffer) |
There was a problem hiding this comment.
Thinking about this, we should move this to the CustomerCenterPurchasesType?
There was a problem hiding this comment.
we should for sue. I will do it in another PR if you don't mind, since that's going to involve some updates and potentially breaking tests and I need to merge this today
| private var viewModel: FeedbackSurveyViewModel | ||
|
|
||
| @Environment(\.localization) | ||
| private var localization: CustomerCenterConfigData.Localization? |
There was a problem hiding this comment.
Sorry for the back and forth but I'm wondering if we should make this not nullable after all... When these views are created, the configuration should have always loaded so it would be safe to assume this not to be null. That way we don't need checks all over the place for nullability. Or are there any views that require localization before the configuration has loaded?
There was a problem hiding this comment.
the configuration is the first thing that gets loaded so there should be localization in all screens
This reverts commit 132ac95.
…onse` - ios-13 (#4090) Requested by @vegaro for [06-17-removes_eligibility_from_reponse](https://github.com/RevenueCat/purchases-ios/tree/06-17-removes_eligibility_from_reponse)
…onse` - ios-16 (#4091) Requested by @vegaro for [06-17-removes_eligibility_from_reponse](https://github.com/RevenueCat/purchases-ios/tree/06-17-removes_eligibility_from_reponse)

Adds displaying a Promotional Offer if the path has an offer id configured