-
-
Notifications
You must be signed in to change notification settings - Fork 167
Add 'Apply to summaries' toggle to blocklist feature #1003
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
base: master
Are you sure you want to change the base?
Add 'Apply to summaries' toggle to blocklist feature #1003
Conversation
Adds an optional toggle to the blocklist settings that allows filtering articles based on their summaries/descriptions in addition to titles. - Toggle defaults to OFF (title-only filtering, less aggressive) - When enabled, checks both article titles and RSS descriptions - Settings state persists across app restarts - Includes 11 passing tests (unit and instrumented) The feature uses SQLite glob pattern matching and integrates with the existing BlocklistUpdateJob to re-apply filters when toggle changes.
spacecowboy
left a comment
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 think it is a good change
See one comment about parameter ordering though. Otherwise LGTM
(Sorry for the delay, I've been without a proper computer for a while)
| items: ImmutableHolder<List<String>>, | ||
| onDismiss: () -> Unit, | ||
| onRemoveItem: (String) -> Unit, | ||
| onAddItem: (String) -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| showToggle: Boolean = false, | ||
| toggleValue: Boolean = false, | ||
| toggleLabel: String = "", | ||
| onToggleChange: (Boolean) -> Unit = {}, |
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 breaks conventional order of arguments for compose
The order should be values, lambdas, modifier
items: ImmutableHolder<List<String>>,
showToggle: Boolean = false,
toggleValue: Boolean = false,
toggleLabel: String = "",
onDismiss: () -> Unit,
onRemoveItem: (String) -> Unit,
onAddItem: (String) -> Unit,
onToggleChange: (Boolean) -> Unit = {},
modifier: Modifier = Modifier,
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.
Done
Move value parameters before lambdas, and modifier to end in EditableListDialog and ListDialogSetting. Follows Compose convention of: values -> lambdas -> modifier.
|
I appreciate the work you put into this. |
|
You can see the output of the EditableListDialog.kt:50Settings.kt:1008 |
Adds an optional toggle to the blocklist settings that allows filtering articles based on their summaries/descriptions in addition to titles.
The feature uses SQLite glob pattern matching and integrates with the existing BlocklistUpdateJob to re-apply filters when toggle changes.