From 62a458bcea8faf52650714632143fb7c7963f2be Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Fri, 22 Jun 2018 07:28:27 -0700 Subject: [PATCH] Fabric: Using `rootTag` instead of deprecated `rootViewTag` in SurfacePresenter Summary: @public Trivial. Reviewed By: mdvacca Differential Revision: D8473512 fbshipit-source-id: 7b6c160a2a1a1abcd571b0522760d49644632922 --- React/Fabric/RCTSurfacePresenter.mm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/React/Fabric/RCTSurfacePresenter.mm b/React/Fabric/RCTSurfacePresenter.mm index 2c2f01c93..e29d4e059 100644 --- a/React/Fabric/RCTSurfacePresenter.mm +++ b/React/Fabric/RCTSurfacePresenter.mm @@ -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