mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
009d80bf5a
commit
c9bbe75be8
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+3
-7
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user