PaywallActivityLauncher: new constructor for a generic ActivityResultCaller#1441
Conversation
…ultCaller` #### Improvements: - Remove duplicated `registerForActivityResult` call - Allow using any instance, like `AppCompatActivity`
|
I think I need this for ReactNative paywalls. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1441 +/- ##
=======================================
Coverage 83.99% 83.99%
=======================================
Files 203 203
Lines 6717 6717
Branches 975 975
=======================================
Hits 5642 5642
Misses 698 698
Partials 377 377 ☔ View full report in Codecov by Sentry. |
| /** | ||
| * Creates a new PaywallActivityLauncher from an [ActivityResultCaller] instance. | ||
| */ | ||
| constructor(resultCaller: ActivityResultCaller, resultHandler: PaywallResultHandler) { |
There was a problem hiding this comment.
Hmm considering both ComponentActivity and Fragment implement ActivityResultCaller, we could potentially remove them and just leave this constructor... Originally I thought to separate them so it's easier to understand, so I think it's better to leave them though... We can reconsider later.
There was a problem hiding this comment.
Good point, I removed the other 2 since they're redundant.
There was a problem hiding this comment.
@tonidero can you confirm this looks good to you?
**This is an automatic release.** ### RevenueCatUI * `PaywallActivityLauncher`: new constructor for a generic `ActivityResultCaller` (#1441) via NachoSoto (@NachoSoto) * Improve fullscreen templates in landscape orientation (#1435) via Toni Rico (@tonidero) * `Paywalls`: improve Japanese localization (#1439) via NachoSoto (@NachoSoto) ### Other Changes * Remove side effect from setting purchasesUpdatedListener (#1443) via Cesar de la Vega (@vegaro) * Paywalls: Store paywall events on disk and API (1) (#1436) via Toni Rico (@tonidero) --------- Co-authored-by: revenuecat-ops <ops@revenuecat.com> Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
Improvements:
registerForActivityResultcallAppCompatActivity