update 获取机器人配置
This commit is contained in:
@@ -42,7 +42,7 @@ class ListenActivity : AppCompatActivity() {
|
||||
initView()
|
||||
initAccessibility()
|
||||
initOverlays()
|
||||
HttpUtil.checkUpdate()
|
||||
initData()
|
||||
PermissionUtils.permission("android.permission.READ_EXTERNAL_STORAGE").request()
|
||||
registerReceiver(openWsReceiver, IntentFilter(Constant.WEWORK_NOTIFY))
|
||||
}
|
||||
@@ -74,6 +74,7 @@ class ListenActivity : AppCompatActivity() {
|
||||
sendBroadcast(Intent(Constant.WEWORK_NOTIFY).apply {
|
||||
putExtra("type", "modify_channel")
|
||||
})
|
||||
HttpUtil.getMyConfig(toast = false)
|
||||
MobclickAgent.onProfileSignIn(channel)
|
||||
}
|
||||
tv_host.text = Constant.host
|
||||
@@ -154,6 +155,11 @@ class ListenActivity : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun initData() {
|
||||
HttpUtil.checkUpdate()
|
||||
HttpUtil.getMyConfig(toast = false)
|
||||
}
|
||||
|
||||
private fun showSelectHostDialog() {
|
||||
val hostList = SPUtils.getInstance().getStringSet("host_list", mutableSetOf(Constant.host))
|
||||
if (hostList.isNotEmpty()) {
|
||||
|
||||
@@ -170,6 +170,10 @@ object AccessibilityUtil {
|
||||
} else {
|
||||
textChanged = true
|
||||
LogUtils.v("未滚动到顶部 $index")
|
||||
if (listener != null && listener.onScroll()) {
|
||||
LogUtils.d("提前终止滚动")
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tryUseGesture) {
|
||||
|
||||
@@ -63,9 +63,11 @@ object HttpUtil {
|
||||
})
|
||||
}
|
||||
|
||||
fun getMyConfig() {
|
||||
fun getMyConfig(toast: Boolean = true) {
|
||||
if (Constant.robotId.isBlank()) {
|
||||
if (toast) {
|
||||
ToastUtils.showLong("请先填写机器人ID")
|
||||
}
|
||||
return
|
||||
}
|
||||
OkGo.get<String>(Constant.getMyConfig())
|
||||
|
||||
Reference in New Issue
Block a user