Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Dont show cancel path if lifetime subscription #4755

Merged
merged 8 commits into from
Feb 7, 2025

Conversation

facumenzella
Copy link
Contributor

Motivation

Display only the paths that are relevant to the subscription

Description

Doing this in the backend requires some extra work, so for now we'll handle it in the client. ManageSubscriptionsViewModel has the relevant change. The other changes are just removing some unnecessary code, and re-organising stuff.

@facumenzella facumenzella requested a review from vegaro February 4, 2025 17:22
@facumenzella facumenzella requested a review from vegaro February 6, 2025 11:38
Copy link
Contributor

@vegaro vegaro left a comment

Choose a reason for hiding this comment

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

Another case I am thinking we shouldn't show the cancel path is if the product is a promotional. To detect a promotional, I've normally checked for the prefix of the product identifier. To test it, you can grant your user a promotional in the dashboard

Feel free to merge this and address that in another PR

@facumenzella facumenzella merged commit 5354cbe into main Feb 7, 2025
10 checks passed
@facumenzella facumenzella deleted the feat/filter-cancel-if-lifetime branch February 7, 2025 10:14
@facumenzella
Copy link
Contributor Author

@vegaro I'll add another ticket and apply that too

facumenzella added a commit to RevenueCat/purchases-android that referenced this pull request Feb 12, 2025
### Motivation
CANCEL should not be shown if the product is a lifetime product.

### Description
This PR follows the same logic as Android, and filters out CANCEL if the
product is lifetime:
1. Check entitlement
2. Subscription is false
3. Non subscription is true

See RevenueCat/purchases-ios#4755
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants