diff options
author | Allan Wang <me@allanwang.ca> | 2017-08-20 14:09:41 -0700 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2017-08-20 14:09:41 -0700 |
commit | 238c263376d2db2ef7bff765155832fa95309cf1 (patch) | |
tree | 202959e8969f0202fbe6c3a7e1f0a9e821e2609a /app/src/main/kotlin/com/pitchedapps/frost/utils | |
parent | 62e10aa1295bdcd99e307b22b4747bb5353cd5d7 (diff) | |
download | frost-238c263376d2db2ef7bff765155832fa95309cf1.tar.gz frost-238c263376d2db2ef7bff765155832fa95309cf1.tar.bz2 frost-238c263376d2db2ef7bff765155832fa95309cf1.zip |
Update login logic
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt index 92d4c109..e342394f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -27,6 +27,7 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.* import com.pitchedapps.frost.dbflow.CookieModel import com.pitchedapps.frost.facebook.FACEBOOK_COM +import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.formattedFbUrl import java.io.IOException @@ -65,7 +66,9 @@ fun Context.launchWebOverlay(url: String) { val argUrl = url.formattedFbUrl L.v("Launch received", url) L.i("Launch web overlay", argUrl) - if (!(Prefs.linksInDefaultApp && resolveActivityForUri(Uri.parse(argUrl)))) + if (argUrl.isFacebookUrl && argUrl.contains("/logout.php")) + FbCookie.logout(this) + else if (!(Prefs.linksInDefaultApp && resolveActivityForUri(Uri.parse(argUrl)))) startActivity(WebOverlayActivity::class.java, false, intentBuilder = { putExtra(ARG_URL, argUrl) }) |