[6.5.0] fix bug of distance thread
This commit is contained in:
@@ -13,6 +13,7 @@ import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.map.roma.IMoGoRomaListener
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import kotlinx.android.synthetic.main.view_roma_distance.view.*
|
||||
import me.jessyan.autosize.utils.AutoSizeUtils
|
||||
|
||||
@@ -77,13 +78,15 @@ class RomaDistanceView @JvmOverloads constructor(
|
||||
|
||||
override fun romaStatus(status: Boolean) {
|
||||
super.romaStatus(status)
|
||||
if (status) {
|
||||
mHandler.sendEmptyMessageDelayed(1, 500)
|
||||
} else {
|
||||
mHandler.removeMessages(1)
|
||||
romaDistanceBg.visibility = View.GONE
|
||||
romaDistanceMeter.text = ""
|
||||
dis = 0
|
||||
ThreadUtils.runOnUiThread {
|
||||
if (status) {
|
||||
mHandler.sendEmptyMessageDelayed(1, 500)
|
||||
} else {
|
||||
mHandler.removeMessages(1)
|
||||
romaDistanceBg.visibility = View.GONE
|
||||
romaDistanceMeter.text = ""
|
||||
dis = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user