From 9f2e3ebcafce858b09ed7364e05d3f854d519fea Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 22 Sep 2022 11:17:25 +0800 Subject: [PATCH] =?UTF-8?q?[2110]=20=E5=88=A4=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt index c6dd0640e5..44d5a0fe25 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt @@ -111,7 +111,9 @@ class SwitchLineAdapter( if(result.open){ result.open = false; notifyItemChanged(index) - result.taskList.clear() + if(result.taskList!=null) { + result.taskList.clear() + } if(index==currentPosition){// 点击当前已经打开的item 去关闭定时网络请求 mItemClickListener?.onItemClick(currentPosition,true) return@setOnClickListener