Refactor UIManager view manager accesses

Summary: Replaced each view manager access with a getViewManager() function call. This will later be used to lazily load view manager classes by allowing java to avoid sending the entire list of view managers to JS.

Reviewed By: QueryConnectionException

Differential Revision: D9695788

fbshipit-source-id: 949858aa2f0b0b00b68e260461ba8f1d085cf07f
This commit is contained in:
Andrew Chen (Eng)
2018-09-27 15:55:31 -07:00
committed by Facebook Github Bot
parent 471e8c168a
commit aac7c4d5d2
17 changed files with 51 additions and 37 deletions

View File

@@ -185,8 +185,9 @@ const ToolbarAndroid = createReactClass({
action.icon = resolveAssetSource(action.icon);
}
if (action.show) {
action.show =
UIManager.ToolbarAndroid.Constants.ShowAsAction[action.show];
action.show = UIManager.getViewManagerConfig(
'ToolbarAndroid',
).Constants.ShowAsAction[action.show];
}
nativeActions.push(action);
}