From 7460935f32748b10f6b3fedf9e77a373a9010d05 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Thu, 27 Sep 2018 18:03:53 -0400 Subject: Move parsers to facebook folder (#1109) --- .../kotlin/com/pitchedapps/frost/facebook/requests/FbRequest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 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 692312a1..a4b0a347 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 @@ -52,7 +52,7 @@ data class RequestAuth(val userId: Long = -1, val cookie: String = "", val fb_dtsg: String = "", val rev: String = "") { - val isValid + val isComplete get() = userId > 0 && cookie.isNotEmpty() && fb_dtsg.isNotEmpty() && rev.isNotEmpty() } @@ -121,13 +121,13 @@ fun String.getAuth(): RequestAuth { val fb_dtsg = FB_DTSG_MATCHER.find(text)[1] if (fb_dtsg != null) { auth = auth.copy(fb_dtsg = fb_dtsg) - if (auth.isValid) return auth + if (auth.isComplete) return auth } val rev = FB_REV_MATCHER.find(text)[1] if (rev != null) { auth = auth.copy(rev = rev) - if (auth.isValid) return auth + if (auth.isComplete) return auth } } } -- cgit v1.2.3