From a6243384bc87548fd91fef5593f569c53750563b Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Tue, 29 Aug 2017 13:49:54 -0400 Subject: Miscellaneous fixes (#223) * Disable js dialogs for headless webviews * Update logging * Fix sharing theme * Add buddylist to drawer and theme update * Blacklist sharer.php from launching in overlay * Add whitelist for message related links --- .../kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt index 0a1878b3..29d2e991 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostUrlOverlayValidator.kt @@ -1,6 +1,7 @@ package com.pitchedapps.frost.web import android.content.Context +import com.pitchedapps.frost.facebook.FbItem import com.pitchedapps.frost.facebook.formattedFbUrl import com.pitchedapps.frost.utils.L import com.pitchedapps.frost.utils.isFacebookUrl @@ -42,7 +43,12 @@ fun Context.requestWebOverlay(url: String): Boolean { return true } +/** + * If the url contains any one of the whitelist segments, switch to the chat overlay + */ +val messageWhitelist = setOf(FbItem.MESSAGES.url, FbItem.CHAT.url) + /** * The following components should never be launched in a new overlay */ -val overlayBlacklist = setOf("messages/?pageNum", "photoset_token") \ No newline at end of file +val overlayBlacklist = setOf("messages/?pageNum", "photoset_token", "sharer.php") \ No newline at end of file -- cgit v1.2.3