Skip to content

Clean up on restoring functionality in customer center#2316

Merged
vegaro merged 8 commits into
mainfrom
cc-418-android-check-for-past-purchases-improvements
Apr 4, 2025
Merged

Clean up on restoring functionality in customer center#2316
vegaro merged 8 commits into
mainfrom
cc-418-android-check-for-past-purchases-improvements

Conversation

@vegaro

@vegaro vegaro commented Apr 1, 2025

Copy link
Copy Markdown
Member

Before:
Screenshot 2025-04-01 at 16 21 22

After:
Screenshot 2025-04-01 at 16 20 13

Suggested flow:

  • User taps Restore past purchases:

We start the restore process immediately and show an alert dialog:

  • Title: Restoring…
  • Body: a spinner

If restore successful show alert:

  • Title: Purchases restored
  • Body: We restored your past purchases and applied them to your account.
  • Button: Done

If restore does not yield anything:

  • Title: No past purchases
  • Body: We could not find any purchases with your account. If you think this is an error, please contact support
  • Default button: Contact Support…
  • Button: Dismiss

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A couple comments, lmk what you think!

@get:JvmSynthetic val supportedPathsForManagementScreen: List<CustomerCenterConfigData.HelpPath>? = null,
@get:JvmSynthetic val showRestoreDialog: Boolean = false,
@get:JvmSynthetic val restorePurchasesState: RestorePurchasesState = RestorePurchasesState.INITIAL,
@get:JvmSynthetic val restorePurchasesState: RestorePurchasesState = RestorePurchasesState.RESTORING,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TBH, feels a bit weird to initiate the state here with RESTORING, when it's not actually restoring anything... Maybe we could make this nullable and indicate null as "not having this operation in progress"? That might actually allow us to remove showRestoreDialog above.

@vegaro vegaro force-pushed the cc-418-android-check-for-past-purchases-improvements branch from 1e7f1d6 to 5ddd4d2 Compare April 3, 2025 12:09
@vegaro vegaro enabled auto-merge April 4, 2025 15:42
@codecov

codecov Bot commented Apr 4, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 11.11111% with 8 lines in your changes missing coverage. Please review.

Project coverage is 80.34%. Comparing base (3f11b50) to head (d2c732d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rchases/customercenter/CustomerCenterConfigData.kt 11.11% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2316      +/-   ##
==========================================
- Coverage   80.34%   80.34%   -0.01%     
==========================================
  Files         281      281              
  Lines        9964     9966       +2     
  Branches     1417     1417              
==========================================
+ Hits         8006     8007       +1     
- Misses       1346     1347       +1     
  Partials      612      612              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vegaro vegaro requested a review from tonidero April 4, 2025 16:14

@tonidero tonidero left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! :shipit:

@vegaro vegaro added this pull request to the merge queue Apr 4, 2025
Merged via the queue into main with commit 2e98b9d Apr 4, 2025
@vegaro vegaro deleted the cc-418-android-check-for-past-purchases-improvements branch April 4, 2025 16:47
github-merge-queue Bot pushed a commit that referenced this pull request Apr 15, 2025
**This is an automatic release.**

## RevenueCat SDK
### 🐞 Bugfixes
* Add missing response fields to `CustomerInfo`. Including transaction
Prices (#2128) via Cesar de la Vega (@vegaro)

## RevenueCatUI SDK
### Paywallv2
#### 🐞 Bugfixes
* [Paywalls v2] Fixes timeline layout when width is Fit (#2354) via
JayShortway (@JayShortway)
* [Paywalls V2] Improves fuzzy matching locale when the region doesn't
match (#2355) via JayShortway (@JayShortway)
* [Paywalls V2] Norwegian Bokmål and Norwegian Nynorsk fall back to
Norwegian. (#2329) via JayShortway (@JayShortway)
### Customer Center
#### 🐞 Bugfixes
* Clean up on restoring functionality in customer center (#2316) via
Cesar de la Vega (@vegaro)

### 🔄 Other Changes
* [Paywalls v2] Adds the unsupported Background type to the error
message (#2350) via JayShortway (@JayShortway)
* [Paywalls v2] Uses a fixed date for template previews to avoid daily
changes. (#2351) via JayShortway (@JayShortway)
* [Paywalls v2] Adds a default case to `Background` and
`ButtonComponent` (#2347) via JayShortway (@JayShortway)
* [Paywalls v2] Improves `PaywallComponentsTemplatePreviewRecorder`
stability (#2352) via JayShortway (@JayShortway)
* [Paywalls v2] Adds a default case to most enums and sealed types
(#2346) via JayShortway (@JayShortway)
* Adds `EnumDeserializerWithDefault` and `SealedDeserializerWithDefault`
(#2345) via JayShortway (@JayShortway)
* [Paywalls V2] Renders template previews in a fixed resolution using
Paparazzi (#2214) via JayShortway (@JayShortway)
* Bump fastlane from 2.227.0 to 2.227.1 (#2344) via dependabot[bot]
(@dependabot[bot])
* Migrate root gradle file to KTS (#2343) via Jaewoong Eum (@skydoves)
* Migrate tester modules to KTS format (#2340) via Jaewoong Eum
(@skydoves)
* Introduce purchases-bom package (#2339) via Jaewoong Eum (@skydoves)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2338) via RevenueCat Git Bot (@RCGitBot)
* [Diagnostics] Removes Android 7 requirement (#2335) via JayShortway
(@JayShortway)
* [Paywalls v2] Fixes `update-paywall-preview-resources-submodule` CI
job (#2337) via JayShortway (@JayShortway)
* Make purchases module to transitive dependency for the ui module
(#2334) via Jaewoong Eum (@skydoves)
* Migrate settings.gradle to KTS and add the dependency resolutions
(#2328) via Jaewoong Eum (@skydoves)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants