aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-09-16 18:18:28 -0400
committerGitHub <noreply@github.com>2017-09-16 18:18:28 -0400
commit5e9ed54c90f994f99deb105d57f4d5b3ca1db8cd (patch)
tree42419a2b276410a8f6e501ae1bb88ad54af78439 /app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
parent43946902504c1aa5c1217e3fe802697566db4c03 (diff)
downloadfrost-5e9ed54c90f994f99deb105d57f4d5b3ca1db8cd.tar.gz
frost-5e9ed54c90f994f99deb105d57f4d5b3ca1db8cd.tar.bz2
frost-5e9ed54c90f994f99deb105d57f4d5b3ca1db8cd.zip
Fix/messaging overlay (#291)
* Create base switcher * Add intent blacklist * Revert extra overlay * Add user agent enum * Test per link user agents * Test extra overlays once again * Fix up messaging overlays
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt4
1 files changed, 2 insertions, 2 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 e342394f..bcda6a43 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
@@ -62,14 +62,14 @@ fun Activity.cookies(): ArrayList<CookieModel> {
* Note that most requests may need to first check if the url can be launched as an overlay
* See [requestWebOverlay] to verify the launch
*/
-fun Context.launchWebOverlay(url: String) {
+fun Context.launchWebOverlay(url: String, clazz: Class<out WebOverlayActivityBase> = WebOverlayActivity::class.java) {
val argUrl = url.formattedFbUrl
L.v("Launch received", url)
L.i("Launch web overlay", 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 = {
+ startActivity(clazz, false, intentBuilder = {
putExtra(ARG_URL, argUrl)
})
}