-
Notifications
You must be signed in to change notification settings - Fork 868
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
[iOS] - Add Free Trial to Leo on iOS #26001
Conversation
91551ce
to
47e0985
Compare
if (selectedTierType == .monthly && isMonthlyIntroOfferAvailable) | ||
|| (selectedTierType == .yearly && isYearlyIntroOfferAvailable) | ||
{ | ||
Text(Strings.AIChat.paywallPurchaseActionIntroOfferTitle) | ||
.font(.body.weight(.semibold)) | ||
.foregroundColor(Color(.white)) | ||
.padding() | ||
} else { | ||
Text(Strings.AIChat.paywallPurchaseActionTitle) | ||
.font(.body.weight(.semibold)) | ||
.foregroundColor(Color(.white)) | ||
.padding() | ||
} |
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.
No need to create a conditional view here, just swap text instead:
let isIntroOfferAvailable =
(selectedTierType == .monthly && isMonthlyIntroOfferAvailable) ||
(selectedTierType == .yearly && isYearlyIntroOfferAvailable)
Text(isIntroOfferAvailable ?
Strings.AIChat.paywallPurchaseActionIntroOfferTitle) :
Strings.AIChat.paywallPurchaseActionTitle)
.font(.body.weight(.semibold))
.foregroundColor(Color(.white))
.padding()
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.
Fixed
/// Retrieves a product's renewable subscription trial status | ||
/// - Parameter product: The product whose subscription trial status to retrieve | ||
/// - Returns: The renewable subscription's trial status | ||
@MainActor |
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.
Why are all these function @MainActor
isolated? None of it seems to require it
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.
Ahh you're right. I got used to applying MainActor
to everything because of BraveSkusSDK
using Brave-Core functions. But in reality only the BraveSkusSDK
needs it. So I removed it from all the AppStoreSDK
functions :)
@@ -357,7 +357,7 @@ extension Strings { | |||
"aichat.paywallYearlySubscriptionDescription", | |||
tableName: "BraveLeo", | |||
bundle: .module, | |||
value: "SAVE UP TO 25%", | |||
value: "BEST VALUE", | |||
comment: | |||
"The description indicating yearly subscription that show how much user is saving percentage" |
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.
Comment needs an update
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.
Fixed.
Released in v1.73.22 |
Resolves brave/brave-browser#37961
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
trim.1777EEA5-7847-479C-B7AE-41645FB953A6.MOV