Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pontaoski
Copy link

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.

@matejdro matejdro requested a review from DreadBoy May 26, 2021 05:04
Copy link
Collaborator

@DreadBoy DreadBoy left a 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({
Copy link
Collaborator

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.

var mutedPkgList =
mutedPackages.data?.value ?? [];
if (value) {
mutedPkgList.removeWhere(
Copy link
Collaborator

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.
@matejdro
Copy link
Collaborator

@pontaoski It looks like you have a conflicts. Since your changes were approved, we can merge when you fix conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants