aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
diff options
context:
space:
mode:
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.kt10
1 files changed, 7 insertions, 3 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 ccc4033c..5a83c3f3 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt
@@ -221,17 +221,21 @@ inline val String?.isFacebookUrl
get() = this != null && contains(FACEBOOK_COM)
/**
- * [true] is url is a video and can be accepted by VideoViewer
+ * [true] if url is a video and can be accepted by VideoViewer
*/
inline val String?.isVideoUrl
get() = this != null && (startsWith(VIDEO_REDIRECT) || startsWith("https://video-"))
/**
- * [true] is url can be displayed in a different webview
+ * [true] if url can be displayed in a different webview
*/
inline val String?.isIndependent
get() = this == null || (startsWith("http") && !isFacebookUrl)
- || !contains("photoset_token")
+ || dependentSet.all { !contains(it) }
+
+val dependentSet = setOf(
+ "photoset_token", "direct_action_execute"
+)
inline val String?.isExplicitIntent
get() = this != null && startsWith("intent://")