mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
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:
committed by
Ahmed El-Helw
parent
3b63d7c3bc
commit
3e30b70e29
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user