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