mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 22:48:25 +08:00
Split StateBuilder.ensureBackingViewIsCreated into 2 different methods
Summary: There are 2 reasons why someone would call StateBuilder.ensureBackingViewIsCreated(): 1) to make sure a View is created, because we are going to use it NOW 2) make sure react styles are applied to View, which doesn't really need the View to be created immediately This diff is splitting the method into 2, without changing behavior. Difference between the methods' signatures is coming from the fact that 1) never takes styles and 2) possibly takes styles. This is a pure refactoring diff and should have no change in functionality or behavior. Reviewed By: ahmedre Differential Revision: D2916697
This commit is contained in:
committed by
Ahmed El-Helw
parent
44b6200392
commit
bb04967986
@@ -132,7 +132,7 @@ public class FlatUIImplementation extends UIImplementation {
|
||||
}
|
||||
|
||||
if (node.mountsToView()) {
|
||||
mStateBuilder.ensureBackingViewIsCreated(node, styles);
|
||||
mStateBuilder.enqueueCreateOrUpdateView(node, styles);
|
||||
}
|
||||
} else {
|
||||
super.handleCreateView(cssNode, rootViewTag, styles);
|
||||
@@ -150,7 +150,7 @@ public class FlatUIImplementation extends UIImplementation {
|
||||
node.handleUpdateProperties(styles);
|
||||
|
||||
if (node.mountsToView()) {
|
||||
mStateBuilder.ensureBackingViewIsCreated(node, styles);
|
||||
mStateBuilder.enqueueCreateOrUpdateView(node, styles);
|
||||
}
|
||||
} else {
|
||||
super.handleUpdateView(cssNode, className, styles);
|
||||
@@ -426,7 +426,7 @@ public class FlatUIImplementation extends UIImplementation {
|
||||
|
||||
FlatShadowNode nonVirtualNode = (FlatShadowNode) node;
|
||||
nonVirtualNode.forceMountToView();
|
||||
mStateBuilder.ensureBackingViewIsCreated(nonVirtualNode, null);
|
||||
mStateBuilder.ensureBackingViewIsCreated(nonVirtualNode);
|
||||
|
||||
FlatUIViewOperationQueue operationsQueue = mStateBuilder.getOperationsQueue();
|
||||
operationsQueue.enqueueSetJSResponder(
|
||||
|
||||
Reference in New Issue
Block a user