Skip to content

Disable offline entitlements in observer mode#1014

Merged
tonidero merged 2 commits into
mainfrom
toniricodiez/sdk-3139-offline-entitlements-disable-feature-in
May 23, 2023
Merged

Disable offline entitlements in observer mode#1014
tonidero merged 2 commits into
mainfrom
toniricodiez/sdk-3139-offline-entitlements-disable-feature-in

Conversation

@tonidero

Copy link
Copy Markdown
Contributor

Description

SDK-3139

This PR will disable offline entitlements entirely in observer mode. We won't update the product-entitlement cache either. This feature doesn't provide any value for users in observer mode so can disable it for them without consequences.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't store observer mode directly, but we store the finishTransactions flag instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe add a comment?
In iOS I solved this by changing the source of truth be called "observer mode", and derive finish transactions from that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah... It's basically the same, but I guess we can have both, so it's easier to understand 👍

@tonidero tonidero marked this pull request as ready for review May 22, 2023 10:07
@tonidero tonidero requested a review from a team May 22, 2023 10:07
@codecov

codecov Bot commented May 22, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1014 (10d0d31) into main (3dc486d) will increase coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 10d0d31 differs from pull request most recent head 0d070e6. Consider uploading reports for the commit 0d070e6 to get more accurate results

@@            Coverage Diff             @@
##             main    #1014      +/-   ##
==========================================
+ Coverage   85.37%   85.39%   +0.02%     
==========================================
  Files         169      168       -1     
  Lines        6005     5993      -12     
  Branches      839      836       -3     
==========================================
- Hits         5127     5118       -9     
+ Misses        546      544       -2     
+ Partials      332      331       -1     
Impacted Files Coverage Δ
.../java/com/revenuecat/purchases/common/AppConfig.kt 82.22% <ø> (-0.39%) ⬇️
...at/purchases/strings/OfflineEntitlementsStrings.kt 0.00% <ø> (ø)
.../offlineentitlements/OfflineEntitlementsManager.kt 93.47% <100.00%> (-0.40%) ⬇️
...otlin/com/revenuecat/purchases/PurchasesFactory.kt 82.20% <100.00%> (ø)

... and 3 files with indirect coverage changes

Base automatically changed from enable-offline-entitlements to main May 23, 2023 08:46
@tonidero tonidero force-pushed the toniricodiez/sdk-3139-offline-entitlements-disable-feature-in branch from ad811cd to 0d070e6 Compare May 23, 2023 08:47
@tonidero tonidero enabled auto-merge (squash) May 23, 2023 08:47
@tonidero tonidero merged commit 4534d8d into main May 23, 2023
@tonidero tonidero deleted the toniricodiez/sdk-3139-offline-entitlements-disable-feature-in branch May 23, 2023 09:04
This was referenced May 24, 2023
tonidero added a commit that referenced this pull request May 25, 2023
**This is an automatic release.**

### New Features
* Support DEFERRED mode (#985) via swehner (@swehner)
* Add completion callback to syncPurchases API (#1002) via Toni Rico
(@tonidero)
### Bugfixes
* Workaround bug in android 4 for JSON objects with List<String> (#942)
via Andy Boedo (@aboedo)
### Dependency Updates
* Bump fastlane-plugin-revenuecat_internal from `fe45299` to `13773d2`
(#1015) via dependabot[bot] (@dependabot[bot])
### Other Changes
* Bump dokka to 1.8.10 to support Gradle 8 (#1009) via Toni Rico
(@tonidero)
* Disable offline entitlements temporarily (#1023) via Toni Rico
(@tonidero)
* Fix integration tests in CI (#1019) via Toni Rico (@tonidero)
* Add offline entitlements integration tests (#1006) via Toni Rico
(@tonidero)
* Disable offline entitlements in observer mode (#1014) via Toni Rico
(@tonidero)
* Extracts setup and teardown to BasePurchasesTest (#1011) via Cesar de
la Vega (@vegaro)
* Support forcing server errors for tests (#1008) via Toni Rico
(@tonidero)

---------

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants