Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

用户手动修改时间导致的点击失效问题 #469

Closed
mrzhangk97 opened this issue Nov 29, 2024 · 2 comments
Closed

用户手动修改时间导致的点击失效问题 #469

mrzhangk97 opened this issue Nov 29, 2024 · 2 comments

Comments

@mrzhangk97
Copy link

描述

用户手动修改时间导致的点击失效问题

理由

当使用onClick()时,如果用户手动修改了客户端时间,改成过去的时间,会导致点击无法被执行

参考实现

建议将OnDebounceClickListener中的判断if (currentTime - lastDebounceClickTime > interval) 改为 abs(currentTime - lastDebounceClickTime) > interval

是否可以参与实现

由于本项目参与者的技术及精力有限无法满足大部分开发者的需求, 欢迎开发者参与贡献

@liangjingkanji
Copy link
Owner

liangjingkanji commented Nov 29, 2024

的确是早期遗留的坑

不过计划修复方案是将 System.currentTimeMillis() 替换为 SystemClock.elapsedRealtime()

@liangjingkanji
Copy link
Owner

请升级至最新版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants