Remove side effect from setting purchasesUpdatedListener#1443
Conversation
tonidero
left a comment
There was a problem hiding this comment.
I think this makes sense. Have you tested the case of closing purchases then configuring again? We only reset the listener when closing purchases, so it's the only point where I think it could be problematic. Not sure how many people use that, but might be good to confirm it reconnects ok.
|
|
||
| every { | ||
| startConnectionOnMainThread() | ||
| } just runs |
There was a problem hiding this comment.
Total nitpick, but I've been using Runs (uppercase) instead of runs. Do you have any preference?
There was a problem hiding this comment.
oh I have no preference, I will change it to the uppercase version 😄
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1443 +/- ##
==========================================
- Coverage 84.13% 84.09% -0.05%
==========================================
Files 197 197
Lines 6649 6644 -5
Branches 965 964 -1
==========================================
- Hits 5594 5587 -7
+ Misses 684 683 -1
- Partials 371 374 +3 ☔ View full report in Codecov by Sentry. |
I haven't tested it, I will. I noticed though, that the Before this change, we were actually calling |
|
It works @tonidero , I configured, then ended connection then configured and it works fine |
**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>
I removed a side effect on setting
purchasesUpdatedListener. I don't think we should be starting/ending the connection there and we should do it independently