From 495df6c84bb7a0daf8cea789f03396b6dabcdf2d Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 5 Jan 2019 00:10:25 -0500 Subject: Remove reactivex from debugger --- .../com/pitchedapps/frost/facebook/requests/FbRequest.kt | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/requests') 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 Array.zip( - crossinline mapper: (List) -> O, - crossinline caller: (T) -> R -): Single { - 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 -- cgit v1.2.3