[2.13.0-arch-opt] thread change to main
This commit is contained in:
@@ -51,6 +51,7 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor(
|
||||
|
||||
private var clickListener: ClickListener? = null
|
||||
private var keyBoardUtil: KeyBoardUtil? = null
|
||||
@Volatile
|
||||
private var connectStatus = false
|
||||
private var lastTime = 0L
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ class VersionNameView @JvmOverloads constructor(
|
||||
const val TAG = "VersionNameView"
|
||||
}
|
||||
|
||||
@Volatile
|
||||
private var dockerVersion: String? = null //工控机版本
|
||||
|
||||
init{
|
||||
|
||||
@@ -293,11 +293,13 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
}
|
||||
|
||||
override fun onAutopilotStatusResponse(autoPilotStatusInfo: AutopilotStatusInfo) {
|
||||
val status = autoPilotStatusInfo.ipcConnStatus
|
||||
if (mLastStatus != status) {
|
||||
val statusInfo = autoPilotStatusInfo.clone()
|
||||
rvConnectInfo.post { updateConnectInfoView(statusInfo) }
|
||||
mLastStatus = status
|
||||
UiThreadHandler.post {
|
||||
val status = autoPilotStatusInfo.ipcConnStatus
|
||||
if (mLastStatus != status) {
|
||||
val statusInfo = autoPilotStatusInfo.clone()
|
||||
rvConnectInfo.post { updateConnectInfoView(statusInfo) }
|
||||
mLastStatus = status
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user