[3.3.0][魔方] 优化连接稳定性

This commit is contained in:
renwj
2023-06-30 15:03:58 +08:00
parent 0f6b477f15
commit 6f51faf690
3 changed files with 11 additions and 3 deletions

View File

@@ -320,7 +320,7 @@ internal class SOPSettingView @JvmOverloads constructor(
}
}
mfTest.isEnabled = true
mfTest.isEnabled = mf?.isConnected() ?: false
mfTest.isChecked = mf?.isEnableTest() ?: false
mfTest.setOnCheckedChangeListener { _, isChecked ->
mf?.enableTest(isChecked)
@@ -410,6 +410,8 @@ internal class SOPSettingView @JvmOverloads constructor(
mfStatusLayout?.also {
it.hideLoadingView()
it.setClickedTextAndTag("断开魔方连接", 0)
mfTest?.isEnabled = true
mfTest?.isChecked = CallerDevaToolsManager.mofang()?.isEnableTest() ?: false
}
}
@@ -417,6 +419,7 @@ internal class SOPSettingView @JvmOverloads constructor(
mfStatusLayout?.also {
it.hideLoadingView()
it.setClickedTextAndTag("开始连接魔方", 1)
mfTest?.isEnabled = false
}
}