Skip to content

Instantly share code, notes, and snippets.

View ReginFell's full-sized avatar
🎯
Focusing

Serhii Zabelnykov ReginFell

🎯
Focusing
  • Amsterdam, Netherlands
View GitHub Profile
@k-kagurazaka
k-kagurazaka / DebounceTest.kt
Created December 1, 2017 14:18
RxJava debounce like operator implementation for kotlin coroutine
launch(UI) {
editText.onTextChanged()
.debounce(1, TimeUnit.SECONDS)
.consumeEach {
Log.d("DebounceTest", "value: $it")
}
}
}
fun EditText.onTextChanged(): ReceiveChannel<String> =