Fabric: Using `rootTag` instead of deprecated `rootViewTag` in SurfacePresenter
Summary: @public Trivial. Reviewed By: mdvacca Differential Revision: D8473512 fbshipit-source-id: 7b6c160a2a1a1abcd571b0522760d49644632922
This commit is contained in:
parent
eff76d237b
commit
62a458bcea
|
@ -82,17 +82,17 @@ using namespace facebook::react;
|
|||
- (void)registerSurface:(RCTFabricSurface *)surface
|
||||
{
|
||||
[_surfaceRegistry registerSurface:surface];
|
||||
[_scheduler registerRootTag:surface.rootViewTag.integerValue];
|
||||
[_scheduler registerRootTag:surface.rootTag];
|
||||
[self runSurface:surface];
|
||||
|
||||
// FIXME: Mutation instruction MUST produce instruction for root node.
|
||||
[_mountingManager.componentViewRegistry dequeueComponentViewWithName:@"Root" tag:surface.rootViewTag.integerValue];
|
||||
[_mountingManager.componentViewRegistry dequeueComponentViewWithName:@"Root" tag:surface.rootTag];
|
||||
}
|
||||
|
||||
- (void)unregisterSurface:(RCTFabricSurface *)surface
|
||||
{
|
||||
[self stopSurface:surface];
|
||||
[_scheduler unregisterRootTag:surface.rootViewTag.integerValue];
|
||||
[_scheduler unregisterRootTag:surface.rootTag];
|
||||
[_surfaceRegistry unregisterSurface:surface];
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ using namespace facebook::react;
|
|||
- (void)runSurface:(RCTFabricSurface *)surface
|
||||
{
|
||||
NSDictionary *applicationParameters = @{
|
||||
@"rootTag": surface.rootViewTag,
|
||||
@"rootTag": @(surface.rootTag),
|
||||
@"initialProps": surface.properties,
|
||||
};
|
||||
|
||||
|
@ -141,7 +141,7 @@ using namespace facebook::react;
|
|||
|
||||
- (void)stopSurface:(RCTFabricSurface *)surface
|
||||
{
|
||||
[_batchedBridge enqueueJSCall:@"AppRegistry" method:@"unmountApplicationComponentAtRootTag" args:@[surface.rootViewTag] completion:NULL];
|
||||
[_batchedBridge enqueueJSCall:@"AppRegistry" method:@"unmountApplicationComponentAtRootTag" args:@[@(surface.rootTag)] completion:NULL];
|
||||
}
|
||||
|
||||
#pragma mark - RCTMountingManagerDelegate
|
||||
|
|
Loading…
Reference in New Issue