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

Create PurchasesStateProvider #1502

Merged
merged 6 commits into from
Nov 30, 2023
Merged

Create PurchasesStateProvider #1502

merged 6 commits into from
Nov 30, 2023

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Nov 27, 2023

This will help removing appInForeground as a parameter of many functions, specially in the BillingWrapper

Since this could become a very big refactor I decided to just go with changing the getter of PurchasesOrchestrator.state for now to get the state held by a PurchasesStateProvider.

Future PRs will remove the appInForeground parameter and access the state directly.

@vegaro vegaro requested a review from a team November 27, 2023 18:17
Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.50%. Comparing base (f5d74b0) to head (94c1ddb).
Report is 253 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1502      +/-   ##
==========================================
+ Coverage   84.46%   84.50%   +0.04%     
==========================================
  Files         217      218       +1     
  Lines        7196     7211      +15     
  Branches     1004     1004              
==========================================
+ Hits         6078     6094      +16     
+ Misses        730      729       -1     
  Partials      388      388              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some suggestions, lmk what you think!

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it!

@vegaro vegaro merged commit ba4d880 into main Nov 30, 2023
9 checks passed
@vegaro vegaro deleted the purchases-state-provider branch November 30, 2023 13:17
vegaro added a commit that referenced this pull request Nov 30, 2023
With #1502 we don't need to pass `appInBackground` as a parameter to the
functions in `BillingAbstract`.

This PR removes those parameters.
This was referenced Dec 5, 2023
vegaro pushed a commit that referenced this pull request Dec 5, 2023
**This is an automatic release.**

### RevenueCatUI
* Paywalls: Add `PaywallFooterView` (#1509) via Toni Rico (@tonidero)
* Paywalls: Remove `PaywallActivity` theme to pickup application's theme
by default (#1511) via Toni Rico (@tonidero)
* Paywalls: Auto-close paywall activity if restore grants required
entitlement identifier (#1507) via Toni Rico (@tonidero)
### Bugfixes
* Improve pricePerYear price calculation precision (#1515) via Toni Rico
(@tonidero)
* Improve price per month accuracy for weekly subscriptions (#1504) via
Andy Boedo (@aboedo)
### Dependency Updates
* Bump danger from 9.4.0 to 9.4.1 (#1512) via dependabot[bot]
(@dependabot[bot])
### Other Changes
* Remove unnecessary appInBackground parameters (#1508) via Cesar de la
Vega (@vegaro)
* Create `PurchasesStateProvider` (#1502) via Cesar de la Vega (@vegaro)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
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.

2 participants