Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upadd callbacks for extension set* methods #3048
Merged
Conversation
| onToggleShields = (event: React.ChangeEvent<HTMLInputElement>) => { | ||
| const shieldsOption: BlockOptions = getToggleStateViaEventTarget(event) | ||
| onToggleShieldsMain = (event: React.ChangeEvent<HTMLInputElement>) => { | ||
| const shieldsOption: BlockOptions = event.target.checked ? 'allow' : 'block' |
This comment has been minimized.
This comment has been minimized.
cezaraugusto
Jul 30, 2019
Contributor
this is exactly what getToggleStateViaEventTarget does. can we keep it?
This comment has been minimized.
This comment has been minimized.
bridiver
Jul 31, 2019
Author
Collaborator
getToggleStateViaEventTarget was super confusing to me because in all other cases it returns the wrong value and then has to be switched back with toggleShieldsValue
| export const setAllowTrackers = (origin: string, setting: string) => | ||
| chrome.braveShields.setAdControlTypeAsync(setting, origin) | ||
| export const setAllowTrackers = (origin: string, setting: string) => { | ||
| return chrome.braveShields.setAdControlTypeAsync(setting, origin) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
bridiver
Jul 31, 2019
Author
Collaborator
we actually do need to return the promise here, but the return is implicit so could be removed
...s/brave_extension/extension/brave_extension/background/api/shieldsAPI.ts
Show resolved
Hide resolved
...s/brave_extension/extension/brave_extension/background/api/shieldsAPI.ts
Outdated
Show resolved
Hide resolved
|
++ |
95fe189
to
f28339a
change brave shields method names for clarity fix brave/brave-browser#5470
|
++ |
This was referenced Aug 28, 2019
Merged
|
Updating milestone to 0.70 as this was merged with 785d4f2 Visible in commit log here: |
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.
bridiver commentedJul 30, 2019
•
edited
change brave shields method names for clarity
fix brave/brave-browser#5470
Submitter Checklist:
npm run lint)git rebase master(if needed).git rebase -ito squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.