-
Notifications
You must be signed in to change notification settings - Fork 887
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
Updates state.excluded in reducer when publisher exclusion is updated #1010
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NejcZdovc
reviewed
Dec 4, 2018
I did a rebase on this and tried to build locally:
|
@clifton - strange. Can you ensure the native-ledger in |
ryanml
force-pushed
the
fix-2340
branch
6 times, most recently
from
December 4, 2018 12:21
d8b0873
to
c53a7f5
Compare
I think this might be too large a change (late in the game) for 0.57.x |
…LUDED_SITES reducer
NejcZdovc
approved these changes
Dec 5, 2018
NejcZdovc
added a commit
that referenced
this pull request
Dec 5, 2018
Updates state.excluded in reducer when publisher exclusion is updated
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes: brave/brave-browser#2340
Native ledger PR: brave-intl/bat-native-ledger#194
Previously, state.excluded was only set when a publisher exclude action was triggered (by clicking on 'excluded' in the -ac table). https://github.com/brave/brave-core/blob/master/components/brave_rewards/resources/ui/reducers/publishers_reducer.ts#L27
With muon import, excluded publishers are handled directly via this call:
brave-core/components/brave_rewards/browser/rewards_service_impl.cc
Lines 511 to 513 in dcc6e31
Because of the direct call, the above reducer wasn't getting hit, therefore state was not reflected.
This adds the publisherKey of the updated publisher to the callback that feeds in to
ON_NUM_EXCLUDED_SITES
, which is triggered whenever there is an exclusion update. The publisherKey is then added or removed from state.excluded depending on what their new status is.Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
state.excluded
is updated appropriately.Reviewer Checklist: