-
Notifications
You must be signed in to change notification settings - Fork 53
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: fix empty description when using custom package type and Offer Period #1519
Conversation
@@ -169,8 +169,7 @@ class VariableProcessorTest { | |||
|
|||
@Test | |||
fun `process variables processes sub_period custom period`() { | |||
rcPackage = TestData.Packages.annual.copy(packageType = PackageType.CUSTOM) | |||
expectVariablesResult("{{ sub_period }}", "") | |||
expectVariablesResult("{{ sub_period }}", "Custom", rcPackage = TestData.Packages.custom) |
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.
<3
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1519 +/- ##
=======================================
Coverage 84.36% 84.36%
=======================================
Files 218 218
Lines 7177 7177
Branches 1004 1004
=======================================
Hits 6055 6055
Misses 734 734
Partials 388 388 ☔ View full report in Codecov by Sentry. |
@@ -50,6 +50,9 @@ internal class VariableDataProvider( | |||
} | |||
|
|||
fun periodName(rcPackage: Package): String? { | |||
if (rcPackage.packageType == PackageType.CUSTOM) { |
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.
Ditto to iOS: UNKNOWN
should use this too.
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.
updated here as well, thanks!
@@ -50,6 +50,10 @@ internal class VariableDataProvider( | |||
} | |||
|
|||
fun periodName(rcPackage: Package): String? { |
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.
What happens if we return null because the resource is not found in line 67? Maybe we should move the fallback to identifier wherever this function is called
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.
Yeah that would be the same approach as in iOS 👍🏻
…pty text when offer period was selected
0c35307
to
dfffd20
Compare
**This is an automatic release.** ### RevenueCatUI * Paywalls: fix empty description when using custom package type and Offer Period (#1519) via Andy Boedo (@aboedo) ### Bugfixes * Disable close button when action is in progress (#1528) via Cesar de la Vega (@vegaro) ### Dependency Updates * Bump danger from 9.4.1 to 9.4.2 (#1527) via dependabot[bot] (@dependabot[bot]) ### Other Changes * Add revenuecatui docs to reference docs (#1526) via Toni Rico (@tonidero) Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Android equivalent of RevenueCat/purchases-ios#3495
If you select a custom package type and set Offer Period, the paywall would have an empty entry for that package.