diff options
author | Allan Wang <me@allanwang.ca> | 2019-01-05 00:10:25 -0500 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-01-05 00:10:25 -0500 |
commit | 495df6c84bb7a0daf8cea789f03396b6dabcdf2d (patch) | |
tree | 022a83435995a8d467e6bd0a778a1a84a196393a /app/src/main/kotlin/com/pitchedapps/frost/facebook/requests | |
parent | 765c74196042430bb2c5b1a0d522da20a4485dc4 (diff) | |
download | frost-495df6c84bb7a0daf8cea789f03396b6dabcdf2d.tar.gz frost-495df6c84bb7a0daf8cea789f03396b6dabcdf2d.tar.bz2 frost-495df6c84bb7a0daf8cea789f03396b6dabcdf2d.zip |
Remove reactivex from debugger
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/requests')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt index 67a03ad4..b49fd970 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt @@ -26,8 +26,6 @@ import com.pitchedapps.frost.facebook.USER_AGENT_BASIC import com.pitchedapps.frost.facebook.get import com.pitchedapps.frost.kotlin.Flyweight import com.pitchedapps.frost.utils.L -import io.reactivex.Single -import io.reactivex.schedulers.Schedulers import kotlinx.coroutines.GlobalScope import okhttp3.Call import okhttp3.FormBody @@ -35,7 +33,6 @@ import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.logging.HttpLoggingInterceptor import org.apache.commons.text.StringEscapeUtils -import java.lang.Exception /** * Created by Allan Wang on 21/12/17. @@ -142,19 +139,6 @@ fun String.getAuth(): RequestAuth { return auth } -inline fun <T, reified R : Any, O> Array<T>.zip( - crossinline mapper: (List<R>) -> O, - crossinline caller: (T) -> R -): Single<O> { - if (isEmpty()) - return Single.just(mapper(emptyList())) - val singles = map { Single.fromCallable { caller(it) }.subscribeOn(Schedulers.io()) } - return Single.zip(singles) { - val results = it.mapNotNull { it as? R } - mapper(results) - } -} - /** * Execute the call and attempt to check validity * Valid = not blank & no "error" instance |