Skip to content

Add onManagementOptionSelected to CustomerCenterListener#2270

Merged
vegaro merged 5 commits into
mainfrom
onManagementOptionSelected
Mar 19, 2025
Merged

Add onManagementOptionSelected to CustomerCenterListener#2270
vegaro merged 5 commits into
mainfrom
onManagementOptionSelected

Conversation

@vegaro

@vegaro vegaro commented Mar 18, 2025

Copy link
Copy Markdown
Member

Equivalent of https://github.com/RevenueCat/purchases-ios/pull/4872/files adding a listener that gets triggered as soon as an option is selected

@emerge-tools

emerge-tools Bot commented Mar 18, 2025

Copy link
Copy Markdown

📸 Snapshot Test

13 modified, 379 unchanged

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

🛸 Powered by Emerge Tools

@codecov

codecov Bot commented Mar 19, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 80.27%. Comparing base (b4e564c) to head (eaf1e12).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/customercenter/CustomerCenterManagementOption.kt 0.00% 3 Missing ⚠️
...purchases/customercenter/CustomerCenterListener.kt 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2270      +/-   ##
==========================================
- Coverage   80.31%   80.27%   -0.05%     
==========================================
  Files         278      279       +1     
  Lines        9489     9494       +5     
  Branches     1337     1337              
==========================================
  Hits         7621     7621              
- Misses       1308     1313       +5     
  Partials      560      560              

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

@JayShortway JayShortway left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looking good! Just making sure sealed is what we want.

/**
* Sealed interface representing different customer center management options.
*/
sealed interface CustomerCenterManagementOption {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just making sure that using sealed is a conscious decision? What are we going to do when adding an *Option? The alternative would be to drop the sealed:

Suggested change
sealed interface CustomerCenterManagementOption {
interface CustomerCenterManagementOption {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oh right... I added it so it could be used in when but yeah, same problems as with the enums when adding a new one. Good point

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

A regular interface can also be used in a when, but the else is mandatory in that case.

@vegaro vegaro requested a review from JayShortway March 19, 2025 10:45

@JayShortway JayShortway left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for making the changes!

Comment thread api-tester/src/defaults/kotlin/com/revenuecat/apitester/kotlin/PurchasesAPI.kt Outdated
…/PurchasesAPI.kt

Co-authored-by: JayShortway <29483617+JayShortway@users.noreply.github.com>
@vegaro vegaro merged commit 54bb85d into main Mar 19, 2025
@vegaro vegaro deleted the onManagementOptionSelected branch March 19, 2025 14:30
This was referenced Mar 19, 2025
vegaro pushed a commit that referenced this pull request Mar 19, 2025
**This is an automatic release.**

## RevenueCatUI SDK
### 🐞 Bugfixes
* Fix landscape mode in Paywalls v1 Template 3 (#2265) via Josh Holtz
(@joshdholtz)
### Customer Center
#### ✨ New Features
* feat: Introduce `CustomerCenterView` for hybrid usage (#2170) via
Cesar de la Vega (@vegaro)
* Add `onManagementOptionSelected` to `CustomerCenterListener` (#2270)
via Cesar de la Vega (@vegaro)
### Paywallv2
#### 🐞 Bugfixes
* [Paywalls V2] Ignores missing font alias if it's blank. (#2271) via
JayShortway (@JayShortway)
* [Paywalls V2] Fixes badges not being overriden (#2266) via JayShortway
(@JayShortway)

### 🔄 Other Changes
* [Diagnostics] Add play_store_version and play_services_version to all
google events (#2269) via Toni Rico (@tonidero)
* [Diagnostics] Add `id` and `app_session_id` to events (#2268) via Toni
Rico (@tonidero)
* Uploads Paparazzi screenshots to Emerge. (#2232) via JayShortway
(@JayShortway)

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.

2 participants