Skip to content

Commit 580de87

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
stop sending events to Paper if C++ Animated is enabled (#51477)
Summary: Pull Request resolved: #51477 changelog: [internal] when using C++ Animated, no need to send events to Objective-C Native Animated. Reviewed By: lenaic Differential Revision: D75066259 fbshipit-source-id: 224d15ba2f707f2272a4fec56e5b2685694c7809
1 parent b1e8729 commit 580de87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import <React/RCTConstants.h>
1313
#import <React/RCTScrollEvent.h>
1414

15+
#import <react/featureflags/ReactNativeFeatureFlags.h>
1516
#import <react/renderer/components/scrollview/RCTComponentViewHelpers.h>
1617
#import <react/renderer/components/scrollview/ScrollViewComponentDescriptor.h>
1718
#import <react/renderer/components/scrollview/ScrollViewEventEmitter.h>
@@ -63,6 +64,9 @@ static UIScrollViewIndicatorStyle RCTUIScrollViewIndicatorStyleFromProps(const S
6364
static void
6465
RCTSendScrollEventForNativeAnimations_DEPRECATED(UIScrollView *scrollView, NSInteger tag, NSString *eventName)
6566
{
67+
if (ReactNativeFeatureFlags::cxxNativeAnimatedEnabled()) {
68+
return;
69+
}
6670
static uint16_t coalescingKey = 0;
6771
RCTScrollEvent *scrollEvent = [[RCTScrollEvent alloc] initWithEventName:eventName
6872
reactTag:[NSNumber numberWithInt:tag]

0 commit comments

Comments
 (0)