diff --git a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp index 9fb51e79fd7..390166bfd7f 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp +++ b/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Binding.cpp @@ -428,11 +428,12 @@ local_ref createUpdatePaddingMountItem( auto newChildShadowView = mutation.newChildShadowView; if (oldChildShadowView.layoutMetrics.contentInsets == - newChildShadowView.layoutMetrics.contentInsets) { + newChildShadowView.layoutMetrics.contentInsets && + mutation.type != ShadowViewMutation::Type::Insert) { return nullptr; } - static auto updateLayoutInstruction = + static auto updatePaddingInstruction = jni::findClassStatic(Binding::UIManagerJavaDescriptor) ->getMethod(jint, jint, jint, jint, jint)>( "updatePaddingMountItem"); @@ -446,7 +447,7 @@ local_ref createUpdatePaddingMountItem( int right = round(contentInsets.right * pointScaleFactor); int bottom = round(contentInsets.bottom * pointScaleFactor); - return updateLayoutInstruction( + return updatePaddingInstruction( javaUIManager, newChildShadowView.tag, left, top, right, bottom); }