Skip to content
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

Merged
merged 3 commits into from
Sep 13, 2023
Merged

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Sep 12, 2023

Adds purchasing listener to view model so we can display state in the UI

@vegaro vegaro changed the base branch from main to paywalls September 12, 2023 15:59
@vegaro vegaro added the feat A new feature label Sep 12, 2023
@vegaro vegaro force-pushed the cesar/pwl-197-add-support-for-purchasing branch from 43add43 to 5be58d1 Compare September 12, 2023 16:00
@@ -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),
Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

❗ No coverage uploaded for pull request base (paywalls@f5eeace). Click here to learn what that means.
Patch has no changes to coverable lines.

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.
📢 Have feedback on the report? Share it here.

@vegaro vegaro changed the title [WIP] Hook up purchasing listeners Hook up purchasing listeners Sep 13, 2023
@vegaro vegaro requested a review from a team September 13, 2023 12:32
@vegaro vegaro marked this pull request as ready for review September 13, 2023 12:32
@vegaro vegaro merged commit e1c78a0 into paywalls Sep 13, 2023
7 checks passed
@vegaro vegaro deleted the cesar/pwl-197-add-support-for-purchasing branch September 13, 2023 13:22
tonidero pushed a commit that referenced this pull request Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants