Skip to content

Instantly share code, notes, and snippets.


Keita Kagurazaka k-kagurazaka

View GitHub Profile
k-kagurazaka / Main.kt
Last active Dec 20, 2017
RxCommand with double context extension pattern
View Main.kt
interface HasDisposables {
fun Disposable.autoDispose()
fun dispose()
companion object {
operator fun invoke(): HasDisposables = object : HasDisposables {
private val disposables = CompositeDisposable()
k-kagurazaka / DebounceTest.kt
Created Dec 1, 2017
RxJava debounce like operator implementation for kotlin coroutine
View DebounceTest.kt
launch(UI) {
.debounce(1, TimeUnit.SECONDS)
.consumeEach {
Log.d("DebounceTest", "value: $it")
fun EditText.onTextChanged(): ReceiveChannel<String> =