From 8f01f33910415c5fdb9fa330adddf3fd402e620f Mon Sep 17 00:00:00 2001 From: yangyakun Date: Wed, 17 Jan 2024 10:18:17 +0800 Subject: [PATCH] =?UTF-8?q?[5.2.8]=20[shuttle=5Fp]=20[bug=20=E5=A4=84?= =?UTF-8?q?=E7=90=86]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/bus/ui/adapter/SwitchLineAdapter.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt b/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt index 741fd6480e..0bf345177a 100644 --- a/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt +++ b/OCH/shuttle/driver/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt @@ -62,10 +62,16 @@ class SwitchLineAdapter( line.taskList, object : SwitchLineTaskAdapter.TaskItemClickListener { override fun onItemClick(position: Int,isCheck:Boolean) { - if(isCheck) { - checkLineId = line.lineId - checkTaskId = line.taskList[position].id - }else{ + try { + if(isCheck) { + checkLineId = line.lineId + checkTaskId = line.taskList[position].id + }else{ + checkLineId=-1 + checkTaskId=-1 + } + }catch (e:Exception){ + e.printStackTrace() checkLineId=-1 checkTaskId=-1 }