Skip to content

Instantly share code, notes, and snippets.

View IkemNwodo's full-sized avatar

Ikem Nwodo IkemNwodo

  • Nigeria
View GitHub Profile
internal sealed class RepositoryResponse<out T> {
class Success<out T>(val data: T) : RepositoryResponse<T>()
class Error(val error: String) : RepositoryResponse<Nothing>()
class ApiError(val error: ApiError) :
internal data class ApiError(
val statusCode: Int,
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(