android: fix flowlayout read item's identifier error
This commit is contained in:
parent
eaaa2c457a
commit
c60ba612f5
@ -102,8 +102,8 @@ class FlowAdapter extends RecyclerView.Adapter<FlowAdapter.DoricViewHolder> {
|
|||||||
}
|
}
|
||||||
JSValue value = getItemModel(position);
|
JSValue value = getItemModel(position);
|
||||||
if (value != null && value.isObject()) {
|
if (value != null && value.isObject()) {
|
||||||
if (value.asObject().getProperty("identifier").isString()) {
|
if (value.asObject().getProperty("props").asObject().getProperty("identifier").isString()) {
|
||||||
return value.asObject().getProperty("identifier").asString().value().hashCode();
|
return value.asObject().getProperty("props").asObject().getProperty("identifier").asString().value().hashCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return super.getItemViewType(position);
|
return super.getItemViewType(position);
|
||||||
|
Reference in New Issue
Block a user