Fix Switch component previews#2509
Merged
Merged
Conversation
JayShortway
approved these changes
Jul 10, 2025
JayShortway
left a comment
Member
There was a problem hiding this comment.
Thanks for taking care of this! Just 1 question.
📸 Snapshot Test2 modified, 646 unchanged
🛸 Powered by Emerge Tools |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2509 +/- ##
=======================================
Coverage 78.30% 78.30%
=======================================
Files 286 286
Lines 10512 10512
Branches 1485 1485
=======================================
Hits 8231 8231
Misses 1635 1635
Partials 646 646 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merged
tonidero
added a commit
that referenced
this pull request
Jul 10, 2025
## RevenueCat SDK This release updates the SDK to use Google Play Billing Library 8. This version of the Billing Library removed APIs to query for expired subscriptions and consumed one-time products, aside from other improvements. You can check the full list of changes here: https://developer.android.com/google/play/billing/release-notes#8-0-0 Additionally, we've also updated Kotlin to 2.0.21 and our new minimum version is Kotlin 1.8.0+. If you were using an older version of Kotlin, you will need to update it. Regarding API changes, we've also removed data classes from our public APIs. This means that for classes that were previously data classes, the `copy` function and `componentN` functions (destructuring declarations) have been removed. `equals` and `hashCode` functions still work as before. ### Play Billing Library 8: No expired subscriptions or consumed one-time products **Note:** the following is only relevant if you recently integrated RevenueCat, and do not (yet) have all your transactions imported. Play Billing Library 8 removed functionality to query expired subscriptions or consumed one-time products. This means that, for users migrating from a non-RevenueCat implementation of the Play Billing Library, the SDK will not be able to send purchase information from these purchases. We can still ingest historical data from these purchases through a backend historical import. See [docs](https://www.revenuecat.com/docs/migrating-to-revenuecat/migrating-existing-subscriptions). This doesn't affect developers that have all transactions in RevenueCat, which is true for the vast majority. ### Bumped minimum Kotlin version RevenueCat SDK v9 bumps Kotlin to 2.0.21, with a minimum Kotlin version of 1.8.0. ### Using the SDK with your own IAP code (previously Observer Mode) Using the SDK with your own IAP code is still supported in v9. Other than updating the SDK version, there are no changes required. Just make sure the version of the Play Billing Library is also version 8.0.0+. ### 💥 Breaking Changes * Removes data classes from public API (#2498) via JayShortway (@JayShortway) * Marks `PaywallData` and `PaywallColor` as `InternalRevenueCatAPI`. (#2507) via JayShortway (@JayShortway) * BC8 migration (#2506) via Toni Rico (@tonidero) * Update to kotlin 2.0.21 while keeping language compatibility (#2493) via Toni Rico (@tonidero) ### 🔄 Other Changes * Update CustomEntitlementComputation sample app kotlin version (#2510) via Toni Rico (@tonidero) * Fix `Switch` component previews (#2509) via Toni Rico (@tonidero) * Add V9 migration guide (#2508) via Toni Rico (@tonidero) * [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule (#2499) via RevenueCat Git Bot (@RCGitBot) --------- Co-authored-by: JayShortway <29483617+JayShortway@users.noreply.github.com>
tonidero
added a commit
that referenced
this pull request
Aug 25, 2025
### Description This fixes the previews for the `Switch` component so we can preview the checked state. They weren't working since they tried to use an unused property `defaultValue`, which is removed in this PR. The component uses the selected tab index to know whether the switch should be checked or not.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This fixes the previews for the
Switchcomponent so we can preview the checked state. They weren't working since they tried to use an unused propertydefaultValue, which is removed in this PR. The component uses the selected tab index to know whether the switch should be checked or not.