mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-07 22:40:55 +08:00
Refactor isFabric() -> getUIManagerType()
Reviewed By: achen1 Differential Revision: D7897855 fbshipit-source-id: 6b52d989187124c81ab8ee4a732703b46b05dc65
This commit is contained in:
committed by
Facebook Github Bot
parent
3ac914478d
commit
a83cddf037
@@ -25,6 +25,7 @@ import static com.facebook.react.bridge.ReactMarkerConstants.REACT_CONTEXT_THREA
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.REACT_CONTEXT_THREAD_START;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.SETUP_REACT_CONTEXT_END;
|
||||
import static com.facebook.react.bridge.ReactMarkerConstants.SETUP_REACT_CONTEXT_START;
|
||||
import static com.facebook.react.uimanager.common.UIManagerType.FABRIC;
|
||||
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_APPS;
|
||||
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
|
||||
import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JS_VM_CALLS;
|
||||
@@ -1011,7 +1012,7 @@ public class ReactInstanceManager {
|
||||
CatalystInstance catalystInstance) {
|
||||
Log.d(ReactConstants.TAG, "ReactInstanceManager.attachRootViewToInstance()");
|
||||
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "attachRootViewToInstance");
|
||||
UIManager uiManagerModule = UIManagerHelper.getUIManager(mCurrentReactContext, rootView.isFabric());
|
||||
UIManager uiManagerModule = UIManagerHelper.getUIManager(mCurrentReactContext, rootView.getUIManagerType());
|
||||
final int rootTag = uiManagerModule.addRootView(rootView);
|
||||
rootView.setRootViewTag(rootTag);
|
||||
rootView.invokeJSEntryPoint();
|
||||
@@ -1037,7 +1038,7 @@ public class ReactInstanceManager {
|
||||
CatalystInstance catalystInstance) {
|
||||
Log.d(ReactConstants.TAG, "ReactInstanceManager.detachViewFromInstance()");
|
||||
UiThreadUtil.assertOnUiThread();
|
||||
if (rootView.isFabric()) {
|
||||
if (rootView.getUIManagerType() == FABRIC) {
|
||||
catalystInstance.getJSModule(ReactFabric.class)
|
||||
.unmountComponentAtNode(rootView.getId());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user