From b90dcc04376b48d2b91fea8a5de48acbd7f885c4 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Mon, 11 Dec 2017 21:18:57 -0500 Subject: 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 --- app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt | 3 ++- app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'app/src/main/kotlin/com') 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://") -- cgit v1.2.3