adalbert
02/28/2018, 8:03 PMRxView
from RxBinding ? (I got unresolved reference)
fun RxView.throttledClick(v: View, s: () -> Any) {
this.clicks(v).throttleFirst(1000, TimeUnit.MILLISECONDS).subscribe{s()}
}
I tried to look deeper
@CheckResult
inline fun View.clicks(): Observable<Unit> = RxView.clicks(this).map(VoidToUnit)
But I am still confused why I can't just add extension method. (I am still new to kotlin)edwardwongtl
03/01/2018, 3:39 AMadalbert
03/01/2018, 5:28 PM