From 25829b025f0049b5b85af1f24f028447bcfe0a59 Mon Sep 17 00:00:00 2001 From: Roc-egg Date: Thu, 15 Apr 2021 13:46:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9BaseNodeAdapter=E6=94=B6?= =?UTF-8?q?=E8=B5=B7=E6=97=B6=E5=88=A0=E9=99=A4=E8=B6=85=E5=A4=9A=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E9=87=8F=E5=8D=A1=E9=A1=BF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/chad/library/adapter/base/BaseNodeAdapter.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/chad/library/adapter/base/BaseNodeAdapter.kt b/library/src/main/java/com/chad/library/adapter/base/BaseNodeAdapter.kt index 804d9f034..9b5b2c025 100644 --- a/library/src/main/java/com/chad/library/adapter/base/BaseNodeAdapter.kt +++ b/library/src/main/java/com/chad/library/adapter/base/BaseNodeAdapter.kt @@ -432,7 +432,12 @@ abstract class BaseNodeAdapter(nodeList: MutableList? = null) } val items = flatData(node.childNode!!, if (isChangeChildCollapse) false else null) val size = items.size - this.data.removeAll(items) +// this.data.removeAll(items) + //修改移除方法解决删除大数据卡顿问题 + this.data.subList( + position + 1, + position + 1 + size + ).clear() if (notify) { if (animate) { notifyItemChanged(adapterPosition, parentPayload)