[6.7.0][运营面板] 优化自动驾驶速度阈值设置逻辑
This commit is contained in:
@@ -109,6 +109,16 @@ fun View.onClick(block: (View) -> Unit) {
|
||||
}
|
||||
}
|
||||
|
||||
fun View.onClickWidthDuration(duration: Int, block: (View) -> Unit) {
|
||||
this.setOnClickListener {
|
||||
if (ClickUtils.isClickTooFrequent(this, duration)) {
|
||||
return@setOnClickListener
|
||||
}
|
||||
block(it)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
val <T: Context> T.lifeCycleScope: LifecycleCoroutineScope
|
||||
get() = (this as? LifecycleOwner)?.lifecycleScope ?: ProcessLifecycleOwner.get().lifecycleScope
|
||||
|
||||
|
||||
Reference in New Issue
Block a user