Please sign in to comment.
Native Animations - Fix edge case with restore default values
Summary: There was an edge case where sometimes a view could be added and removed in the same batch so this caused issues because we ran `disconnectAnimatedNodeFromView` before `connectAnimatedNodeToView`. This separates restoring default values from `disconnectAnimatedNodeFromView` so we can run only `restoreDefaultValues` on the pre-operations queue and just do nothing in case the view doesn't exist (it is fine because we know it will be removed immediately). **Test plan** Tested that native animations still work properly in RNTester and tested that the edge case crash was fixed. Closes #14114 Differential Revision: D5128989 Pulled By: javache fbshipit-source-id: 9f47a2d3aafeb06d8ed1a4dd1800b8af225edb7d
- Loading branch information...
Showing with 30 additions and 7 deletions.
- +2 −0 Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.h
- +7 −4 Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m
- +3 −3 Libraries/NativeAnimation/RCTNativeAnimatedModule.m
- +2 −0 Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h
- +16 −0 Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m