Implement remove root view operations

Summary: This diff implements the removal of react root view inside fabric cxx implementation

Reviewed By: shergin

Differential Revision: D8939942

fbshipit-source-id: 69835b55c80e2970d65220d947489bc1af4b125d
This commit is contained in:
David Vacca 2018-08-15 17:49:49 -07:00 коммит произвёл Facebook Github Bot
Родитель 596f17efda
Коммит f9c86f05e9
2 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -12,6 +12,11 @@ public interface UIManager extends JSIModule, PerformanceCounter {
*/ */
<T extends SizeMonitoringFrameLayout & MeasureSpecProvider> int addRootView(final T rootView); <T extends SizeMonitoringFrameLayout & MeasureSpecProvider> int addRootView(final T rootView);
/**
* Unregisters a new root view.
*/
void removeRootView(int reactRootTag);
/** /**
* Updates the layout specs of the RootShadowNode based on the Measure specs received by * Updates the layout specs of the RootShadowNode based on the Measure specs received by
* parameters. * parameters.

Просмотреть файл

@ -547,6 +547,7 @@ public class FabricUIManager implements UIManager, JSHandler, FabricBinder {
} }
public void removeRootView(int rootTag) { public void removeRootView(int rootTag) {
mUIViewOperationQueue.enqueueRemoveRootView(rootTag);
mRootShadowNodeRegistry.removeNode(rootTag); mRootShadowNodeRegistry.removeNode(rootTag);
} }