From 37f8898eaccc050a74dd3d098e25464050a6d2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Wed, 21 Jul 2021 17:46:24 +0800 Subject: [PATCH] fix: Android list reuse identifier get error --- .../src/main/java/pub/doric/shader/list/ListAdapter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doric-android/doric/src/main/java/pub/doric/shader/list/ListAdapter.java b/doric-android/doric/src/main/java/pub/doric/shader/list/ListAdapter.java index a6448275..28ef8a02 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/list/ListAdapter.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/list/ListAdapter.java @@ -82,8 +82,8 @@ class ListAdapter extends RecyclerView.Adapter { } JSValue value = getItemModel(position); if (value != null && value.isObject()) { - if (value.asObject().getProperty("identifier").isString()) { - return value.asObject().getProperty("identifier").asString().value().hashCode(); + if (value.asObject().getProperty("props").asObject().getProperty("identifier").isString()) { + return value.asObject().getProperty("props").asObject().getProperty("identifier").asString().value().hashCode(); } } return super.getItemViewType(position);