Skip to content

Instantly share code, notes, and snippets.

View IkemNwodo's full-sized avatar

Ikem Nwodo IkemNwodo

  • Nigeria
View GitHub Profile
@IkemNwodo
IkemNwodo / KotlinRxExt.kt
Created April 17, 2020 11:09 — forked from AAverin/KotlinRxExt.kt
Kotlin Rx Extensions
import rx.Observable
import rx.Observer
import rx.Subscriber
import rx.Subscription
import rx.functions.Action0
import rx.functions.Action1
fun <T> Observable<T>.uiSubscribe(schedulers: Schedulers, subscriber: Subscriber<in T>): Subscription {
return subscribeOn(schedulers.io)
.observeOn(schedulers.mainThread)