[3.0.0] 处理包车司机端倒计时bug

This commit is contained in:
wangmingjun
2023-04-10 19:38:35 +08:00
parent 2002a21907
commit 9ae98eb279
4 changed files with 7 additions and 1 deletions

View File

@@ -9,5 +9,6 @@ import com.magic.mogo.och.charter.bean.QueryCurrentOrderResponse
interface DriverM1OrderCallback {
fun updateOrderUI(orderStatus: QueryCurrentOrderResponse.Result) // 到达站
fun updateOverCountDown(minutes: Long) //倒计时ms
fun clearCountDown() //清除倒计时
fun updateReturnCarStatus(returnSuccess: Boolean)
}

View File

@@ -186,7 +186,7 @@ class DriverM1Fragment : CharterBaseFragment<DriverM1Fragment?, DriverM1Presente
}.start()
}
private fun clearCountDownTimer() {
fun clearCountDownTimer() {
if (countDownTimer != null){
countDownTimer?.cancel()
countDownTimer = null

View File

@@ -517,6 +517,7 @@ class DriverM1Model {
DriverM1LooperManager.starCountDownLoop()
}else{
DriverM1LooperManager.stopCountDownLoop()
mOrderCallback?.clearCountDown()
}
}

View File

@@ -105,6 +105,10 @@ class DriverM1Presenter(view: DriverM1Fragment?) :
mView?.updateCountDown(minutes)
}
override fun clearCountDown() {
mView?.clearCountDownTimer()
}
override fun updateReturnCarStatus(returnSuccess: Boolean) {
mView?.updateReturnCarStatus(returnSuccess)
}