diff --git a/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm b/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm index 9643b9f7d4e62c..2d41c1d0d79beb 100644 --- a/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +++ b/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm @@ -26,9 +26,6 @@ @implementation RCTNativeAnimatedTurboModule NSMutableArray *_operations; // Operations called before views have been updated. NSMutableArray *_preOperations; - NSMutableDictionary *_animIdIsManagedByFabric; - // A set of nodeIDs managed by Fabric. - NSMutableSet *_nodeIDsManagedByFabric; } RCT_EXPORT_MODULE(); @@ -43,8 +40,6 @@ - (instancetype)init if (self = [super init]) { _operations = [NSMutableArray new]; _preOperations = [NSMutableArray new]; - _animIdIsManagedByFabric = [NSMutableDictionary new]; - _nodeIDsManagedByFabric = [NSMutableSet new]; } return self; } @@ -113,9 +108,6 @@ - (void)setSurfacePresenter:(id)surfacePresenter RCT_EXPORT_METHOD(connectAnimatedNodes:(double)parentTag childTag:(double)childTag) { - if ([_nodeIDsManagedByFabric containsObject:@(childTag)]) { - [_nodeIDsManagedByFabric addObject:@(parentTag)]; - } [self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) { [nodesManager connectAnimatedNodes:[NSNumber numberWithDouble:parentTag] childTag:[NSNumber numberWithDouble:childTag]]; }]; @@ -138,11 +130,7 @@ - (void)setSurfacePresenter:(id)surfacePresenter [nodesManager startAnimatingNode:[NSNumber numberWithDouble:animationId] nodeTag:[NSNumber numberWithDouble:nodeTag] config:config endCallback:callBack]; }]; - BOOL isNodeManagedByFabric = [_nodeIDsManagedByFabric containsObject:@(nodeTag)]; - if (isNodeManagedByFabric) { - self->_animIdIsManagedByFabric[[NSNumber numberWithDouble:animationId]] = @YES; - [self flushOperationQueues]; - } + [self flushOperationQueues]; } RCT_EXPORT_METHOD(stopAnimation:(double)animationId) @@ -150,9 +138,7 @@ - (void)setSurfacePresenter:(id)surfacePresenter [self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) { [nodesManager stopAnimation:[NSNumber numberWithDouble:animationId]]; }]; - if ([_animIdIsManagedByFabric[[NSNumber numberWithDouble:animationId]] boolValue]) { - [self flushOperationQueues]; - } + [self flushOperationQueues]; } RCT_EXPORT_METHOD(setAnimatedNodeValue:(double)nodeTag @@ -192,9 +178,6 @@ - (void)setSurfacePresenter:(id)surfacePresenter RCT_EXPORT_METHOD(connectAnimatedNodeToView:(double)nodeTag viewTag:(double)viewTag) { - if (RCTUIManagerTypeForTagIsFabric(@(viewTag))) { - [_nodeIDsManagedByFabric addObject:@(nodeTag)]; - } [self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) { // viewName is not used when node is managed by Fabric, and nodes are always managed by Fabric in Bridgeless. [nodesManager connectAnimatedNodeToView:[NSNumber numberWithDouble:nodeTag] viewTag:[NSNumber numberWithDouble:viewTag] viewName:nil]; @@ -296,7 +279,6 @@ - (void)flushOperationQueues _preOperations = [NSMutableArray new]; _operations = [NSMutableArray new]; - RCTExecuteOnMainQueue(^{ for (AnimatedOperation operation in preOperations) { operation(self->_nodesManager);