-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Paywalls
: don't display "Purchases restored successfully" if nothings was restored
#3233
Conversation
…ntitlements We can improve the logic here, but this is a simple improvement for the obvious case where nothing was actually restored. We don't have an easy way to test this, but at least I added coverage for `onRestoreCompleted` which was missing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's play it safe and generalize to all transactions, not just active entitlements
RevenueCatUI/Views/FooterView.swift
Outdated
if !customerInfo.entitlements.active.isEmpty { | ||
self.displayRestoredAlert = true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be accurate - it assumes that the developer is using entitlements, which is encouraged but not required.
We should check nonSubscriptionTransactions as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
Paywalls
: don't display "Purchases restored successfully" with no entitlementsPaywalls
: don't display "Purchases restored successfully" if nothings was restored
84edd09
to
b4da438
Compare
let success = try await self.purchaseHandler.restorePurchases().success | ||
if success { | ||
self.displayRestoredAlert = true | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks good to me as a stopgap, but I think we should try to get copy for saying something about "no purchases found" and localize it.
No-op is kind of an awkward experience to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filed a Linear for this.
We can improve the logic here, but this is a simple improvement for the obvious case where nothing was actually restored.