-
-
Notifications
You must be signed in to change notification settings - Fork 674
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 button press cancel current hold #4509
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.
The PR looks good to me.
I only have one suggestion for a better clarity but it does not affect functionality.
self.right_btn.hold_canceled(ctx); | ||
return None; | ||
} | ||
_ => {} |
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.
Because the power button does not exist in t2b1 nor t3b1 models, I would suggest returning None even in this case and remove returning of the ButtonState::BothDown
after the added match
statement
_ => {} | |
_ => { | |
return None; | |
} |
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.
OK, just returned None in all cases.
On TS3, when holding a button to confirm, pressing the other button now cancels the "hold".
Note: we want to cancel it without an animation rather than with the "shrinking" animation as if the held button was released!