Paywalls: Add PaywallView#1510
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## add-paywall-footer-view #1510 +/- ##
========================================================
Coverage 84.50% 84.50%
========================================================
Files 218 218
Lines 7211 7211
Branches 1004 1004
========================================================
Hits 6094 6094
Misses 729 729
Partials 388 388 ☔ View full report in Codecov by Sentry. |
vegaro
left a comment
There was a problem hiding this comment.
There is some code shared between PaywallView and PaywallFooterView. I was wondering if it would be worth it to extract it to a common class. For example, the bug with the font family resource id being 0 could have been fixed in both views at the same time if we had that code somewhere else that's common for both. But I am not sure what's the best strategy to share that code.
Ohh right... There is one more parameter currently in the full screen view than that footer view, and this uses ids, but I will think of ways to share that, thanks! |
…venuecatui/views/PaywallView.kt Co-authored-by: Cesar de la Vega <cesarvegaro@gmail.com>
### Description This is a possible approach to [this comment](#1510 (review)). Basically, there is a bunch of duplicated logic between `PaywallView` and `PaywallFooterView`. This extracts part of it to a different class, the logic related to parsing xml attributes. We could try to create a superclass/interface that abstracts some of the other methods... But that is relatively straightforward, and didn't want to have to expose another type just for that.
…d-paywall-view # Conflicts: # ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/views/PaywallFooterView.kt # ui/revenuecatui/src/main/res/values/paywall_view_attrs.xml
|
@tonidero can you take a look at the merge conflicts resolution? |
|
Took a look, makes sense! |
|
Awesome! |
Description
Full screen counterpart to #1509. This adds a new view
PaywallViewwhich wraps thePaywallcomposable so it's usable in the view system.The view will be used in the hybrids.