-
Notifications
You must be signed in to change notification settings - Fork 879
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
Do not show 0% after normalization #2428
Conversation
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.
LGTM++ (security tests are failing which look unrelated but please check before merging)
@@ -2829,7 +2829,9 @@ void RewardsServiceImpl::OnPublisherListNormalizedSaved( | |||
|
|||
ContentSiteList site_list; | |||
for (auto& publisher : *list) { | |||
site_list.push_back(PublisherInfoToContentSite(publisher)); | |||
if (publisher.percent >= 1) { |
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 don't think this is the right place to do this. This is UI logic and should be filtered by the UI, not by RewardsServiceImpl
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.
also there should be a test for this
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.
this was added here as other (sort is here as well) that is then sent to UI. Left comment here how I want to solve it https://github.com/brave/brave-core/pull/2432/files#r283678712
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 sort is also here which is UI, but I think even short-term it would be better to move both of those to the UI class OnPublisherListNormalized observer method. I think we're all on the same page now that we should be doing the calculations at query time and dumping the serialized normalization? If not let's discuss in slack with @tmancey as well
Resolves brave/brave-browser#4386
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests && npm run test-security
) onnpm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.