From 4fc0630faacf31cd99c1e83a152132af7ae6161f Mon Sep 17 00:00:00 2001 From: Joshua Gross Date: Thu, 19 May 2022 18:55:56 -0700 Subject: [PATCH] Animated MegaOp: fix `removeAnimatedEventFromView` call Summary: We were calling the wrong operation from the MegaOp which caused indices to become offset. Trivial fix. Changelog: [Internal] Reviewed By: javache Differential Revision: D36482822 fbshipit-source-id: 83ebc37a8773f0277db4caff9d3e7c9c91931ddb --- .../java/com/facebook/react/animated/NativeAnimatedModule.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java index 056fca7a3e4..681413dda36 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +++ b/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java @@ -1184,7 +1184,8 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec case OP_CODE_REMOVE_ANIMATED_EVENT_FROM_VIEW: viewTag = opsAndArgs.getInt(i++); decrementInFlightAnimationsForViewTag(viewTag); - animatedNodesManager.dropAnimatedNode(viewTag); + animatedNodesManager.removeAnimatedEventFromView( + viewTag, opsAndArgs.getString(i++), opsAndArgs.getInt(i++)); break; case OP_CODE_ADD_LISTENER: case OP_CODE_REMOVE_LISTENERS: