Remove gating for legacy interop layer view hierarchy changes

Summary: changelog: [internal]

Reviewed By: javache

Differential Revision: D34756141

fbshipit-source-id: f78ee2376d03652813353bfd88c3c349d1c6ae4f
This commit is contained in:
Samuel Susla
2022-03-11 09:00:17 -08:00
committed by Facebook GitHub Bot
parent 009d80bf5a
commit c9bbe75be8
4 changed files with 3 additions and 32 deletions
-6
View File
@@ -15,9 +15,3 @@ RCT_EXTERN NSString *const RCTUserInterfaceStyleDidChangeNotificationTraitCollec
*/
RCT_EXTERN BOOL RCTExperimentGetPreemptiveViewAllocationDisabled(void);
RCT_EXTERN void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value);
/*
* Interop layer keep view hierarchy.
*/
RCT_EXTERN BOOL RCTGetInteropLayerKeepViewHierarchy(void);
RCT_EXTERN void RCTSetInteropLayerKeepViewHierarchy(BOOL value);
-15
View File
@@ -24,18 +24,3 @@ void RCTExperimentSetPreemptiveViewAllocationDisabled(BOOL value)
{
RCTExperimentPreemptiveViewAllocationDisabled = value;
}
/*
* Preemptive View Allocation
*/
static BOOL RCTInteropLayerKeepViewHierarchy = NO;
BOOL RCTGetInteropLayerKeepViewHierarchy()
{
return RCTInteropLayerKeepViewHierarchy;
}
void RCTSetInteropLayerKeepViewHierarchy(BOOL value)
{
RCTInteropLayerKeepViewHierarchy = value;
}
@@ -205,13 +205,9 @@ static NSString *const kRCTLegacyInteropChildIndexKey = @"index";
for (NSDictionary *mountInstruction in _viewsToBeMounted) {
NSNumber *index = mountInstruction[kRCTLegacyInteropChildIndexKey];
UIView *childView = mountInstruction[kRCTLegacyInteropChildComponentKey];
if (RCTGetInteropLayerKeepViewHierarchy()) {
if ([childView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childView).contentView;
[_adapter.paperView insertReactSubview:target atIndex:index.integerValue];
} else {
[_adapter.paperView insertReactSubview:childView atIndex:index.integerValue];
}
if ([childView isKindOfClass:[RCTLegacyViewManagerInteropComponentView class]]) {
UIView *target = ((RCTLegacyViewManagerInteropComponentView *)childView).contentView;
[_adapter.paperView insertReactSubview:target atIndex:index.integerValue];
} else {
[_adapter.paperView insertReactSubview:childView atIndex:index.integerValue];
}
-4
View File
@@ -263,10 +263,6 @@ static BackgroundExecutor RCTGetBackgroundExecutor()
RCTExperimentSetPreemptiveViewAllocationDisabled(YES);
}
RCTSetInteropLayerKeepViewHierarchy(
reactNativeConfig &&
reactNativeConfig->getBool("react_native_new_architecture:interop_layer_keep_view_hierarchy"));
auto componentRegistryFactory =
[factory = wrapManagedObject(_mountingManager.componentViewRegistry.componentViewFactory)](
EventDispatcher::Weak const &eventDispatcher, ContextContainer::Shared const &contextContainer) {