Keep UIManagerModule as a default renderer
Reviewed By: fkgozali Differential Revision: D8439626 fbshipit-source-id: d761d977c9e6dab38f21e18da72b045483431f79
This commit is contained in:
parent
5230b23130
commit
3bc62f3610
|
@ -26,18 +26,9 @@ public class UIManagerHelper {
|
||||||
*/
|
*/
|
||||||
public static UIManager getUIManager(ReactContext context, @UIManagerType int uiManagerType) {
|
public static UIManager getUIManager(ReactContext context, @UIManagerType int uiManagerType) {
|
||||||
CatalystInstance catalystInstance = context.getCatalystInstance();
|
CatalystInstance catalystInstance = context.getCatalystInstance();
|
||||||
UIManager uiManager;
|
return uiManagerType == FABRIC ?
|
||||||
switch (uiManagerType) {
|
catalystInstance.getJSIModule(UIManager.class) :
|
||||||
case FABRIC:
|
catalystInstance.getNativeModule(UIManagerModule.class);
|
||||||
uiManager = catalystInstance.getJSIModule(UIManager.class);
|
|
||||||
break;
|
|
||||||
case DEFAULT:
|
|
||||||
uiManager = catalystInstance.getNativeModule(UIManagerModule.class);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new IllegalArgumentException("Invalid UIManagerType: " + uiManagerType);
|
|
||||||
}
|
|
||||||
return uiManager;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue