Skip to content

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Jul 4, 2025

If the subscription is already cancelled, it should say "Resubscribe" instead of "Cancel Subscription"

It should also not open any feedback survey or promotional offer

@vegaro vegaro added the pr:fix A bug fix label Jul 4, 2025
Copy link

emerge-tools bot commented Jul 4, 2025

📸 Snapshot Test

648 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
TestPurchasesUIAndroidCompatibility Paparazzi
com.revenuecat.testpurchasesuiandroidcompatibility.paparazzi
0 0 0 0 251 0 N/A
TestPurchasesUIAndroidCompatibility
com.revenuecat.testpurchasesuiandroidcompatibility
0 0 0 0 397 0 N/A

🛸 Powered by Emerge Tools

@vegaro vegaro marked this pull request as ready for review July 8, 2025 16:11
@vegaro vegaro requested review from JayShortway, facumenzella and a team July 8, 2025 16:11
Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

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

Nice, looks good!

Comment on lines 385 to 389
private fun transformPathsOnSubscriptionState(
paths: List<HelpPath>,
selectedPurchaseInformation: PurchaseInformation?,
localization: CustomerCenterConfigData.Localization,
): List<HelpPath> {
Copy link
Member

Choose a reason for hiding this comment

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

Minor, but we can make paths the receiver, so we don't need the let above:

    private fun List<HelpPath>.transformPathsOnSubscriptionState(
        selectedPurchaseInformation: PurchaseInformation?,
        localization: CustomerCenterConfigData.Localization,
    ): List<HelpPath> {

(You can press Option+Enter with your caret in the paths parameter, and click "Convert parameter to receiver" to do it automatically.)

@@ -122,7 +121,7 @@ class CustomerCenterViewModelTests {
}

@Test
fun `loadAndDisplayPromotionalOffer returns false when offer is not eligible`() = runTest {
fun `loadAndDisplayPromotionalOffer returns false when offer is not eligible`(): Unit = runBlocking {
Copy link
Member

Choose a reason for hiding this comment

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

🎉

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.

Looks great!!

@vegaro vegaro enabled auto-merge July 18, 2025 06:57
@vegaro vegaro added this pull request to the merge queue Jul 18, 2025
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.09%. Comparing base (6a5e235) to head (ee2b842).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
...rchases/customercenter/CustomerCenterConfigData.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2487      +/-   ##
==========================================
- Coverage   78.10%   78.09%   -0.01%     
==========================================
  Files         286      286              
  Lines       10573    10575       +2     
  Branches     1485     1485              
==========================================
+ Hits         8258     8259       +1     
- Misses       1668     1669       +1     
  Partials      647      647              

☔ 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.

Merged via the queue into main with commit 85fdf41 Jul 18, 2025
14 checks passed
@vegaro vegaro deleted the cc-484-if-cancelled-not-show-cancel-and-change-to-resubscribe branch July 18, 2025 07:39
github-merge-queue bot pushed a commit that referenced this pull request Jul 23, 2025
**This is an automatic release.**

## RevenueCat SDK
### 🐞 Bugfixes
* Resubscribe if cancelled (#2487) via Cesar de la Vega (@vegaro)
### Virtual Currency
#### 🐞 Bugfixes
* Update VC Caching Log Message (#2552) via Will Taylor (@fire-at-will)

## RevenueCatUI SDK
### Customer Center
#### 🐞 Bugfixes
* Update design of No Active subscriptions screen in Customer Center
(#2559) via Cesar de la Vega (@vegaro)

### 🔄 Other Changes
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2561) via RevenueCat Git Bot (@RCGitBot)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2560) via RevenueCat Git Bot (@RCGitBot)
* Bump danger from 9.5.1 to 9.5.3 (#2556) via dependabot[bot]
(@dependabot[bot])
* Bump fastlane from 2.227.2 to 2.228.0 (#2557) via dependabot[bot]
(@dependabot[bot])
* Bump fastlane-plugin-revenuecat_internal from `9a29f63` to `7d97553`
(#2558) via dependabot[bot] (@dependabot[bot])
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2555) via RevenueCat Git Bot (@RCGitBot)
* Bump nokogiri from 1.18.8 to 1.18.9 (#2553) via dependabot[bot]
(@dependabot[bot])
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2551) via RevenueCat Git Bot (@RCGitBot)
* Fix paywall tester so customer center doesn't close when changing to
dark mode (#2550) via Cesar de la Vega (@vegaro)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
tonidero pushed a commit that referenced this pull request Aug 25, 2025
If the subscription is already cancelled, it should say "Resubscribe"
instead of "Cancel Subscription"

It should also not open any feedback survey or promotional offer
@tonidero tonidero mentioned this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:fix A bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants