Skip to content

Commit

Permalink
Remove unused removeRootView() method from FabricUIManager
Browse files Browse the repository at this point in the history
Summary:
FabricUIManager.removeRootView() isn't currently used, removing it from the UIManager interface.

It looks like this is called from JS in paper renderers, but not Fabric, so we should be good to delete it.

Reviewed By: shergin, mdvacca

Differential Revision: D16275118

fbshipit-source-id: b8f3ae1dc7574ce17d8cc9e7fee72ef5dcc9b323
  • Loading branch information
Emily Janzer authored and facebook-github-bot committed Jul 17, 2019
1 parent a43615a commit 5f8c129
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ public interface UIManager extends JSIModule, PerformanceCounter {
<T extends View> int addRootView(
final T rootView, WritableMap initialProps, @Nullable String initialUITemplate);

/** Unregisters a new root view. */
void removeRootView(int reactRootTag);

/**
* Updates the layout specs of the RootShadowNode based on the Measure specs received by
* parameters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,6 @@ public void onRequestEventBeat() {
mEventDispatcher.dispatchAllEvents();
}

@Override
public void removeRootView(int reactRootTag) {
// TODO T31905686: integrate with the unmounting of Fabric React Renderer.
mMountingManager.removeRootView(reactRootTag);
mReactContextForRootTag.remove(reactRootTag);
if (DEBUG) {
FLog.d(TAG, "Removing surface for reactTag: ", reactRootTag);
}
}

@Override
public void initialize() {
mEventDispatcher.registerEventEmitter(FABRIC, new FabricEventEmitter(this));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ public <T extends View> int addRootView(
return tag;
}

/** Unregisters a new root view. */
@ReactMethod
public void removeRootView(int rootViewTag) {
mUIImplementation.removeRootView(rootViewTag);
Expand Down

0 comments on commit 5f8c129

Please sign in to comment.