Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Prevent Guardian Ad-Lite purchase by users who have either of
adFree
orallowRejectAll
benefits already #6675Prevent Guardian Ad-Lite purchase by users who have either of
adFree
orallowRejectAll
benefits already #6675Changes from all commits
4845ae3
476dded
b34cb92
50e32fc
700f9b4
f00d595
527ded8
9d6b1bf
6bc3120
0be1361
d378714
3b4c120
ec11d92
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's an issue with calling the user benefits API the purchase will be blocked and we'll show a generic error message to the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this now be "maybeUserDetails" since the signed in status can vary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had this same thought and decided to leave it as is because in the case of this
val
it's still either:None
orI.e.
maybeLoggedInUserDetails
won't ever contain information about a user who isn't signed in. Though like you say it's true that theOption
typeUserDetailsWithSignedInStatus
can represent this state. What do you reckon?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, right. That's quite subtle but seems fine to leave as is