mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-12 17:30:12 +08:00
When creating a View using NativeViewHierarchyManager, pass ThemedReactContext instead of root view tag
Summary: public NativeViewHierarchyManager.createView() takes int rootViewTag which is only used to resolve ThemedReactContext, but we already have it resolved before we enqueueCreateView, so we can just pass it directly. This makes mRootViewsContext tag -> to ThemedReactContext mapping unnecessary in NativeViewHierarchyManager. Makes the class simpler. Reviewed By: kmagiera, astreet Differential Revision: D2460280 fb-gh-sync-id: 68c503f4fb37ca0b1dcb2abc9e0c33a5225d1f6a
This commit is contained in:
committed by
facebook-github-bot-4
parent
c4c74215fa
commit
fe28118a48
@@ -121,7 +121,7 @@ public class UIImplementation {
|
||||
}
|
||||
|
||||
if (!cssNode.isVirtual()) {
|
||||
mNativeViewHierarchyOptimizer.handleCreateView(cssNode, rootViewTag, styles);
|
||||
mNativeViewHierarchyOptimizer.handleCreateView(cssNode, rootNode.getThemedContext(), styles);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user