I have a problem with my app that if the user clicks the button multiple times quickly, then multiple events are generated before even my dialog holding the button disappear
Put a little example here
view.safeClick { doSomething() }
@SuppressLint("CheckResult") fun View.safeClick(invoke: () -> Unit) { RxView .clicks(this) .throttleFirst(300, TimeUnit.MILLISECONDS) .subscribe { invoke() } }