-
Notifications
You must be signed in to change notification settings - Fork 965
Add update filter lists button #24828
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
Conversation
c51c256
to
ff028b2
Compare
9907afe
to
80baf8e
Compare
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.
Is this just to avoid porting brave://components
?
var isUpdating: Bool { | ||
return self == .updating | ||
} | ||
|
||
var isUpdated: Bool { | ||
return self == .updated | ||
} |
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.
These don't seem useful since your enum does not contain any associated values and thus can be compared directly
do { | ||
try await FilterListCustomURLDownloader.shared.updateFilterLists() | ||
} catch { | ||
// Handle the error |
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.
Error isn't handled?
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.
Yah I should handle this. I put the comment but wasn't sure how to deal with it and forgot about it. Thanks for catching 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.
@@ -54,6 +54,27 @@ import Preferences | |||
} | |||
} | |||
|
|||
func updateFilterLists() async -> Bool { |
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 will run on main, is that ok?
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 believe this should be fine. The method does this:
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
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.
Okay then shit will require it always run on main then unless you use a task runner on the core side, if the @MainActor
is ever removed from the parent type this will need to make sure its marked as MainActor again
80baf8e
to
5d504a0
Compare
No we still want this. Desktop has it too. brave://components is for more "advanced" users |
Resolves brave/brave-browser#35982
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:
Screenshots
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2024-07-25.at.09.41.37.mp4