From d89b0a7bbbde1795e841d4fb6400bacf34caedfe Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Tue, 4 Apr 2023 10:46:49 +0800 Subject: [PATCH] android: fix in list, cell changed cause node lost --- .../doric/src/main/java/pub/doric/shader/SuperNode.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doric-android/doric/src/main/java/pub/doric/shader/SuperNode.java b/doric-android/doric/src/main/java/pub/doric/shader/SuperNode.java index 32ce214d..1073285c 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/SuperNode.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/SuperNode.java @@ -127,7 +127,12 @@ public abstract class SuperNode extends ViewNode { JSValue[] subviews = jsValue.asArray().toArray(); List finalTarget = new ArrayList<>(); - + if (oriSubviews.isArray()) { + JSArray array = oriSubviews.asArray(); + for (int i = 0; i < array.size(); i++) { + finalTarget.add(array.get(i)); + } + } for (JSValue subview : subviews) { boolean find = false; if (oriSubviews.isArray()) { @@ -135,7 +140,6 @@ public abstract class SuperNode extends ViewNode { if (viewIdIsEqual(subview.asObject(), targetSubview.asObject())) { find = true; recursiveMixin(subview.asObject(), targetSubview.asObject()); - finalTarget.add(targetSubview); break; } }