Fix commit order of operations in Nodes

Summary: @public Split dispatchViewUpdates into two methods, which enables subclasses to commit pending ui operations, even when no root node is present.

Differential Revision: D3011191
This commit is contained in:
Ahmed El-Helw
2016-03-04 16:20:47 -08:00
parent a541384621
commit 1a4d40df6c
2 changed files with 15 additions and 4 deletions

View File

@@ -380,13 +380,20 @@ public class FlatUIImplementation extends UIImplementation {
parentNode.addChildAt(childNode, index);
}
@Override
protected void updateViewHierarchy(EventDispatcher eventDispatcher) {
mStateBuilder.beforeUpdateViewHierarchy();
super.updateViewHierarchy(eventDispatcher);
mStateBuilder.afterUpdateViewHierarchy(eventDispatcher);
}
@Override
protected void applyUpdatesRecursive(
ReactShadowNode cssNode,
float absoluteX,
float absoluteY,
EventDispatcher eventDispatcher) {
mStateBuilder.applyUpdates(eventDispatcher, (FlatRootShadowNode) cssNode);
mStateBuilder.applyUpdates((FlatRootShadowNode) cssNode);
}
@Override