-
Notifications
You must be signed in to change notification settings - Fork 26
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
Make alerting_apps.dart screen easier to toggle apps #159
base: master
Are you sure you want to change the base?
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.
Code is fine as it is but I think it could be simplified.
@@ -208,6 +208,27 @@ class CobbleTile extends StatelessWidget { | |||
trailing: child, | |||
); | |||
|
|||
factory CobbleTile.toggle({ |
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.
CobbleTile.app
isn't used anywhere else except in AlertingApps screen in exactly this case, I think you can safely change it to work like you want. You don't have to create new factory, I think.
lib/ui/screens/alerting_apps.dart
Outdated
var mutedPkgList = | ||
mutedPackages.data?.value ?? []; | ||
if (value) { | ||
mutedPkgList.removeWhere( |
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 doesn't look like formatted code.
Having to target a tiny switch on each list item isn't very ergonomic; right handed users have to scrunch their hands to be able to access them and left handled users have to stretch their hands to be able to access them. Making the entire list delegate toggleable fixes this.
@pontaoski It looks like you have a conflicts. Since your changes were approved, we can merge when you fix conflicts. |
Having to target a tiny switch on each list item isn't very ergonomic;
right handed users have to scrunch their hands to be able to access them
and left handled users have to stretch their hands to be able to access them.
Making the entire list delegate toggleable fixes this.