forked from upstream-mirrors/quik
Tap image to view fullscreen
This commit is contained in:
@@ -28,4 +28,9 @@ fun <T, R> Flowable<T>.mapNotNull(mapper: (T) -> R?): Flowable<R>
|
||||
.filter { optional -> optional.notNull() }
|
||||
.map { optional -> optional.value }
|
||||
|
||||
fun <T, R> Observable<T>.mapNotNull(mapper: (T) -> R?): Observable<R>
|
||||
= map { input -> Optional(mapper(input)) }
|
||||
.filter { optional -> optional.notNull() }
|
||||
.map { optional -> optional.value }
|
||||
|
||||
fun <T> Observable<T>.toFlowable(): Flowable<T> = this.toFlowable(io.reactivex.BackpressureStrategy.BUFFER)
|
||||
Reference in New Issue
Block a user