From 2e22f2ae6a963a2e00dc4b50b4a308c80ebe68e2 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 27 Sep 2018 20:15:11 -0400 Subject: Fix more lints --- .../kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt') 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 a4b0a347..500c4102 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 @@ -115,8 +115,8 @@ fun String.getAuth(): RequestAuth { .url(FB_URL_BASE) .get() .call() - call.execute().body()?.charStream()?.useLines { - it.forEach { + call.execute().body()?.charStream()?.useLines { lines -> + lines.forEach { val text = StringEscapeUtils.unescapeEcmaScript(it) val fb_dtsg = FB_DTSG_MATCHER.find(text)[1] if (fb_dtsg != null) { @@ -153,8 +153,8 @@ inline fun Array.zip(crossinline mapper: (List) -> fun executeForNoError(call: Call): Boolean { val body = call.execute().body() ?: return false var empty = true - body.charStream().useLines { - it.forEach { + body.charStream().useLines { lines -> + lines.forEach { if (it.contains("error")) return false if (empty && it.isNotEmpty()) empty = false } -- cgit v1.2.3