From 6fd3bc2175c5325bc088d5f031691f93bec13a42 Mon Sep 17 00:00:00 2001 From: Paige Sun Date: Tue, 2 Nov 2021 17:30:33 -0700 Subject: [PATCH] Fix Gemstone Profile Swiping Animations by fixing Animated.Value for Animated.event Reviewed By: RSNara Differential Revision: D32037021 fbshipit-source-id: 41da68706e6c752bf480d11112f70692f7234756 --- Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm b/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm index 0964e23a0fa60a..da3659ef933d4b 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +++ b/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm @@ -162,6 +162,10 @@ - (void)setSurfacePresenter:(id)surfacePresenter [self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) { [nodesManager setAnimatedNodeValue:[NSNumber numberWithDouble:nodeTag] value:[NSNumber numberWithDouble:value]]; }]; + // In Bridge, flushing of native animations is done from RCTCxxBridge batchDidComplete(). + // Since RCTCxxBridge doesn't exist in Bridgeless, and components are not remounted in Fabric for native animations, + // flush here for changes in Animated.Value for Animated.event. + [self flushOperationQueues]; } RCT_EXPORT_METHOD(setAnimatedNodeOffset:(double)nodeTag