( lView: LView, tNode: TNode, runningAnimations: Promise<unknown>, callback: Function, )
| 391 | } |
| 392 | |
| 393 | function runAfterLeaveAnimations( |
| 394 | lView: LView, |
| 395 | tNode: TNode, |
| 396 | runningAnimations: Promise<unknown>, |
| 397 | callback: Function, |
| 398 | ) { |
| 399 | runningAnimations.then(() => { |
| 400 | // We only want to clear the running flag and the allLeavingAnimations set if |
| 401 | // the current running animation is the same as the one we just waited for. |
| 402 | // If it's different, it means another animation started while we were waiting, |
| 403 | // and that other animation is now responsible for clearing the flag. |
| 404 | if (lView[ANIMATIONS]?.running === runningAnimations) { |
| 405 | lView[ANIMATIONS]!.running = undefined; |
| 406 | allLeavingAnimations.delete(lView[ID]); |
| 407 | } |
| 408 | clearTrackedLeavingNode(lView, tNode); |
| 409 | callback(true); |
| 410 | }); |
| 411 | } |
| 412 | |
| 413 | /** |
| 414 | * Recursively initializes the detached leave animations list for a view and all its nested |
no test coverage detected