优化:

增加了防抖的时间800毫秒
This commit is contained in:
18401019693 2022-08-24 15:47:35 +08:00
parent 5f2fdd7052
commit 3defb6a335

View File

@ -24,7 +24,7 @@ public class ViewClicksAntiShake {
*/ */
public static void clicksAntiShake(View view, ViewClicksCallBack callBack) { public static void clicksAntiShake(View view, ViewClicksCallBack callBack) {
RxView.clicks(view) RxView.clicks(view)
.throttleFirst(500, TimeUnit.MILLISECONDS) .throttleFirst(800, TimeUnit.MILLISECONDS)
.subscribe(new Observer<Unit>() { .subscribe(new Observer<Unit>() {
@Override @Override
public void onSubscribe(Disposable d) { public void onSubscribe(Disposable d) {