Fix subtle bugs in cloning and FabricUIManager

Reviewed By: achen1

Differential Revision: D7164980

fbshipit-source-id: 86e9f3f11b67c8947b177aac23f99808083c3121
This commit is contained in:
David Vacca 2018-03-05 21:07:37 -08:00 committed by Facebook Github Bot
parent 52c7957349
commit ac929ef4f6
2 changed files with 2 additions and 1 deletions

View File

@ -64,6 +64,7 @@ public class FabricUIManager implements UIManager {
ReactShadowNode node = viewManager.createShadowNodeInstance(mReactApplicationContext);
ReactShadowNode rootNode = getRootNode(rootTag);
node.setRootNode(rootNode);
node.setViewClassName(viewName);
node.setReactTag(reactTag);
node.setThemedContext(rootNode.getThemedContext());

View File

@ -104,7 +104,7 @@ public class ReactShadowNodeImpl implements ReactShadowNode<ReactShadowNodeImpl>
mShouldNotifyOnLayout = original.mShouldNotifyOnLayout;
mNodeUpdated = original.mNodeUpdated;
mChildren = original.mChildren == null ? null : new ArrayList<>(original.mChildren);
mParent = original.mParent;
mParent = null;
mIsLayoutOnly = original.mIsLayoutOnly;
mTotalNativeChildren = original.mTotalNativeChildren;
mNativeParent = original.mNativeParent;