You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by gu...@apache.org on 2017/09/26 02:20:45 UTC
[48/51] [abbrv] incubator-weex git commit: correct code
correct code
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/018bc3cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/018bc3cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/018bc3cc
Branch: refs/heads/dev
Commit: 018bc3cc3868bcae564014fa5c0ad5463231f4a4
Parents: 73cc3b0
Author: jianbai.gbj <ji...@alibaba-inc.com>
Authored: Mon Sep 25 23:51:48 2017 +0800
Committer: jianbai.gbj <ji...@alibaba-inc.com>
Committed: Mon Sep 25 23:51:48 2017 +0800
----------------------------------------------------------------------
.../com/taobao/weex/ui/component/binding/Statements.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/018bc3cc/android/sdk/src/main/java/com/taobao/weex/ui/component/binding/Statements.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/binding/Statements.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/binding/Statements.java
index 559a7d9..755bae2 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/binding/Statements.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/binding/Statements.java
@@ -181,13 +181,15 @@ public class Statements {
WXComponent renderNode = null;
if(renderIndex < parent.getChildCount()){
renderNode = parent.getChild(renderIndex);
- if(renderNode.isWaste()){
- renderNode.setWaste(false);
- }
//check is same statment, if true, it is usabled.
if(!isCreateFromNodeStatement(renderNode, component)){
renderNode = null;
}
+ if(renderNode != null){
+ if(renderNode.isWaste()){
+ renderNode.setWaste(false);
+ }
+ }
}
//none resuable render node, create node, add to parent, but clear node's statement
if(renderNode == null){
@@ -231,7 +233,6 @@ public class Statements {
return 1;
}else{
component.setWaste(false);
- return 1;
}
}
}