-
Notifications
You must be signed in to change notification settings - Fork 893
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
Fixes ads enabled by default on upgrade of 1.2 to 1.3 for new ad regions #4392
Conversation
@@ -605,7 +605,9 @@ ExtensionFunction::ResponseAction BraveRewardsSaveAdsSettingFunction::Run() { | |||
AdsService* ads_service_ = AdsServiceFactory::GetForProfile(profile); | |||
if (ads_service_) { | |||
if (params->key == "adsEnabled") { | |||
ads_service_->SetEnabled(params->value == "true"); | |||
const auto is_enabled = | |||
params->value == "true" && ads_service_->IsSupportedLocale(); |
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.
The bug was caused by this line, due to a legacy issue where the ads flag was enabled even if the user's locale was unsupported
97401ff
to
e80c4dd
Compare
@NejcZdovc @gdregalo Unrelated CI failure |
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.
LGTM
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.
rewards code looks good
Helping merge since code owner unavailable. CI looks good- it's yellow (acceptable - ran into problem on network audit + test install. there are known issues). Good to merge if otherwise approved 👍 |
Verified using
|
Fixes brave/brave-browser#7741
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Recommend tests:
Following upgrade paths from 0.63, 0.67, 0.68, 0.69, 0.70, 0.71, 0.72, 1.0, 1.1 and 1.2
Reviewer Checklist:
After-merge Checklist:
changes has landed on.