aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-12-11 21:18:57 -0500
committerGitHub <noreply@github.com>2017-12-11 21:18:57 -0500
commitb90dcc04376b48d2b91fea8a5de48acbd7f885c4 (patch)
tree6aded93178a507631215ac2309485c0fb3f6fe4c /app/src/main/kotlin/com/pitchedapps
parentdb262e95779e0a17275bdb94be2b0ac12819178e (diff)
downloadfrost-b90dcc04376b48d2b91fea8a5de48acbd7f885c4.tar.gz
frost-b90dcc04376b48d2b91fea8a5de48acbd7f885c4.tar.bz2
frost-b90dcc04376b48d2b91fea8a5de48acbd7f885c4.zip
misc (#548)
* Separate scss files and fix some issues * Delete blank css * Update menu stylings * Add branch details to auto release * Update script and readme * Test 2 * Test 3
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt3
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt10
2 files changed, 9 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
index 64f0b652..43bc5724 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
@@ -3,8 +3,9 @@ package com.pitchedapps.frost.facebook
/**
* Created by Allan Wang on 2017-06-01.
*/
-const val HTTPS_FACEBOOK_COM = "https://facebook.com"
+
const val FACEBOOK_COM = "facebook.com"
+const val HTTPS_FACEBOOK_COM = "https://$FACEBOOK_COM"
const val FB_URL_BASE = "https://m.$FACEBOOK_COM/"
fun PROFILE_PICTURE_URL(id: Long) = "https://graph.facebook.com/$id/picture?type=large"
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://")