Skip to content

Fix a bug when determining whether an existing animation has completed#1332

Merged
amorde merged 1 commit intomasterfrom
amorde/animation-timing-fix
Jul 7, 2025
Merged

Fix a bug when determining whether an existing animation has completed#1332
amorde merged 1 commit intomasterfrom
amorde/animation-timing-fix

Conversation

@amorde
Copy link
Copy Markdown
Contributor

@amorde amorde commented Jul 3, 2025

Fixes a bug in the logic for determining if a given layer has active animations.

When encountering an animation that has already completed (its completion time is in the past), we incorrectly determined it was not completed. This would lead to waitForAnimationsToFinish() to continue running until it hits the animation wait timeout, which defaults to 2 seconds.

result = YES;
}
} else if (currentTime > completionTime) {
} else if (currentTime < completionTime) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦

@mjohnson12
Copy link
Copy Markdown
Collaborator

Unfortunately, there might be tests that break now that this is correct.

@amorde
Copy link
Copy Markdown
Contributor Author

amorde commented Jul 3, 2025

Unfortunately, there might be tests that break now that this is correct.

Yeah, I've been working with @congt to verify this and it appears to not be too bad! Seems doable. A few places that maybe need some more typing delays etc.

@amorde amorde merged commit ea4b985 into master Jul 7, 2025
9 of 10 checks passed
@amorde amorde deleted the amorde/animation-timing-fix branch July 7, 2025 17:33
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.

4 participants