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

[Fix-563] Switch: UserInteraction bug #566

Merged
merged 2 commits into from
Oct 24, 2023
Merged

Conversation

robergro
Copy link
Contributor

One developer on Polaris found this problem on the switch:

  1. Init the switch with isOn to false (or true)
  2. set directly the isOn to a different value true (or false)

-> the switch userInteraction is disabled.

Why:
The userInteraction is always set to false before update the space position inside the toggle and reset to the old value when the animation is finished. But if a new value is set before the completion of the previous animation, the bug appears.

Solution:

  • get the current userInteraction from the viewModel and not from the UIView

@robergro robergro merged commit 7ce02a5 into main Oct 24, 2023
4 checks passed
@robergro robergro deleted the fix/switch-interaction branch October 24, 2023 14:50
@robergro robergro linked an issue Oct 24, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fix] Switch interaction
2 participants