RevenueCat / purchases-android

Android in-app purchases and subscriptions made easy.
https://www.revenuecat.com/
MIT License
247 stars 50 forks source link

Diagnostics: sync only on first activity foregrounded #1728

Closed tonidero closed 4 months ago

tonidero commented 4 months ago

Description

As I was testing some things, I noticed we are syncing diagnostics on SDK initialization, which is ok most times, but we don't want to sync when the app is woken by notifications or alarms. Only when the app is open. This moves the syncing process to avoid those extra requests.

RevenueCat-Danger-Bot commented 4 months ago
1 Message
:book: Size increase: 0.84 KB

Generated by :no_entry_sign: Danger

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 83.17%. Comparing base (5b8935b) to head (60f0474). Report is 88 commits behind head on main.

Files with missing lines Patch % Lines
.../com/revenuecat/purchases/PurchasesOrchestrator.kt 66.66% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1728 +/- ## ======================================= Coverage 83.17% 83.17% ======================================= Files 223 223 Lines 7596 7597 +1 Branches 1075 1075 ======================================= + Hits 6318 6319 +1 Misses 854 854 Partials 424 424 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.