From 2b51bc4bfa86863ed14b550fe3281840587ab038 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 12 Nov 2017 02:48:36 -0500 Subject: enhancement/video-player (#480) * Add toolbar visibility toggle and draw it over viewer * Set contract bindings once available * Fix video url param error and prepare progressanimator * Add gif support and better transitions * Interface a lot of things * Reorder back press * Clean up files and fix selector * Add gif support * Redraw bounds when necessary --- app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt') 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 6d6c5381..22c77f5f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/Utils.kt @@ -30,6 +30,7 @@ import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.* import com.pitchedapps.frost.dbflow.CookieModel import com.pitchedapps.frost.facebook.* +import com.pitchedapps.frost.facebook.FbUrlFormatter.Companion.VIDEO_REDIRECT import com.pitchedapps.frost.utils.iab.IS_FROST_PRO import org.jsoup.Jsoup import org.jsoup.nodes.Element @@ -200,6 +201,9 @@ fun Context.resolveActivityForUri(uri: Uri): Boolean { inline val String?.isFacebookUrl get() = this != null && this.contains(FACEBOOK_COM) +inline val String?.isVideoUrl + get() = this != null && this.startsWith(VIDEO_REDIRECT) + fun Context.frostChangelog() = showChangelog(R.xml.frost_changelog, Prefs.textColor) { theme() if (System.currentTimeMillis() - Prefs.installDate > 2592000000) { //show after 1 month -- cgit v1.2.3