mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-06 09:31:11 +08:00
Fix commands not always going through with Nodes
Summary: Previously, to fix the issue of commands happening before the Views were made and attached to the hierarchy, a check was added to see if a node had not been mounted to a View, to update its hierarchy. In reality, we need to do this irrespective, since a node could be mounted to a View, but its children may not yet be attached, for example. Note that if there is nothing to be done, this won't do extra work (i.e. applyUpdates recursively goes through the tree from the node on which we did the operation to apply updates, but if there are no updates, we stop traversing that praticular subtree). Reviewed By: sriramramani Differential Revision: D3511462
This commit is contained in:
@@ -154,16 +154,15 @@ import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
}
|
||||
}
|
||||
|
||||
/* package */ boolean ensureBackingViewIsCreated(FlatShadowNode node) {
|
||||
/* package */ void ensureBackingViewIsCreated(FlatShadowNode node) {
|
||||
if (node.isBackingViewCreated()) {
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
|
||||
int tag = node.getReactTag();
|
||||
mOperationsQueue.enqueueCreateView(node.getThemedContext(), tag, node.getViewClass(), null);
|
||||
|
||||
node.signalBackingViewIsCreated();
|
||||
return true;
|
||||
}
|
||||
|
||||
/* package */ void dropView(FlatShadowNode node) {
|
||||
|
||||
Reference in New Issue
Block a user