Don't pass tag alongside node in StateBuilder methods

Summary:
Many of StateBuilder methods take a lot of arguments, which makes it hard to read. This patch is doing a bit of cleanup by removing tag from the method signatures, because tag can be easily obtained from the node itself.

This is a pure refactoring diff and should have no functional changes.

Reviewed By: ahmedre

Differential Revision: D2915815
This commit is contained in:
Denis Koroskin
2016-02-19 17:36:59 -08:00
committed by Ahmed El-Helw
parent 3b63d7c3bc
commit 3e30b70e29
2 changed files with 14 additions and 23 deletions

View File

@@ -132,8 +132,7 @@ public class FlatUIImplementation extends UIImplementation {
}
if (node.mountsToView()) {
int tag = cssNode.getReactTag();
mStateBuilder.ensureBackingViewIsCreated(node, tag, styles);
mStateBuilder.ensureBackingViewIsCreated(node, styles);
}
} else {
super.handleCreateView(cssNode, rootViewTag, styles);
@@ -151,8 +150,7 @@ public class FlatUIImplementation extends UIImplementation {
node.handleUpdateProperties(styles);
if (node.mountsToView()) {
int tag = cssNode.getReactTag();
mStateBuilder.ensureBackingViewIsCreated(node, tag, styles);
mStateBuilder.ensureBackingViewIsCreated(node, styles);
}
} else {
super.handleUpdateView(cssNode, className, styles);
@@ -427,13 +425,12 @@ public class FlatUIImplementation extends UIImplementation {
}
FlatShadowNode nonVirtualNode = (FlatShadowNode) node;
int nonVirtualTag = nonVirtualNode.getReactTag();
nonVirtualNode.forceMountToView();
mStateBuilder.ensureBackingViewIsCreated(nonVirtualNode, nonVirtualTag, null);
mStateBuilder.ensureBackingViewIsCreated(nonVirtualNode, null);
FlatUIViewOperationQueue operationsQueue = mStateBuilder.getOperationsQueue();
operationsQueue.enqueueSetJSResponder(
nonVirtualTag,
nonVirtualNode.getReactTag(),
possiblyVirtualReactTag,
blockNativeResponder);
}