Skip to content

Cancel every running stack animation safely - #8353

Open
OskarEichler wants to merge 1 commit into
wix:masterfrom
OskarEichler:codex/fix-cancel-all-stack-animations
Open

Cancel every running stack animation safely#8353
OskarEichler wants to merge 1 commit into
wix:masterfrom
OskarEichler:codex/fix-cancel-all-stack-animations

Conversation

@OskarEichler

Copy link
Copy Markdown

Problem

StackAnimator.cancelAllAnimations() only clears its tracking maps; the animators keep running against views the caller may immediately destroy. cancelPushAnimations() iterates a live map while synchronous cancel/end listeners remove entries, so cancelling multiple pushes can also trigger concurrent modification or skip work.

Fix

  • snapshot every running animator before mutating its registry
  • clear all tracking maps before cancel-all so command-completion callbacks remain suppressed
  • cancel the snapshots so every animator actually stops without iterating a listener-mutated map

Breaking changes

None. Cancellation now performs the action its API promises; normal completed animations and callback semantics are unchanged.

Test plan

  • Added a cancel-all regression proving the animator receives cancel(), transition tracking clears, and the command callback stays suppressed.
  • Added two-simultaneous-push coverage proving both animators are cancelled safely.
  • Exact baseline fails because cancel-all never calls cancel(); fixed focused suite passes 14/14.
  • Full Android unit suite passes: 699 successes, 0 failures, 2 skipped.
  • git diff --check passes.

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.

1 participant