-
Notifications
You must be signed in to change notification settings - Fork 48
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
Hook up purchasing listeners #1243
Conversation
43add43
to
5be58d1
Compare
@@ -14,7 +14,8 @@ import com.revenuecat.purchases.ui.revenuecatui.templates.Template2 | |||
@Composable | |||
internal fun InternalPaywallView( | |||
offering: Offering? = null, | |||
viewModel: PaywallViewModel = getPaywallViewModel(offering = offering), | |||
listener: PaywallViewListener? = null, | |||
viewModel: PaywallViewModel = getPaywallViewModel(offering = offering, listener = listener), |
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.
@tonidero can you please check this out? I am not sure this approach is okay
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.
I think this looks ok. One option if we're worried about passing more parameters is to pass the entire PaywallViewOptions
object instead of each of these separately.
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.
that might make sense yes... I think we can keep these three and if the number of parameters starts growing too much we can do that
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## paywalls #1243 +/- ##
===========================================
Coverage ? 85.48%
===========================================
Files ? 187
Lines ? 6346
Branches ? 923
===========================================
Hits ? 5425
Misses ? 564
Partials ? 357 ☔ View full report in Codecov by Sentry. |
Adds purchasing listener to view model so we can display state in the UI