aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-04-21 20:22:11 -0400
committerAllan Wang <me@allanwang.ca>2019-04-21 20:22:11 -0400
commitbbafb7b65ce655c1fdda8badd3098d2a0e1f7f08 (patch)
tree354b0bb6f021af54d1e3586e3e9bda064ad4ef02 /app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
parente5eb928feacba8d1c634ad8e5d85259ae161cabd (diff)
parentf0f95295bdb2b853aa6262ec4bed2353ce326eee (diff)
downloadfrost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.tar.gz
frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.tar.bz2
frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.zip
Merge dev
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
index 594b0acd..1dd027fd 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
@@ -32,8 +32,8 @@ import com.pitchedapps.frost.db.FrostDatabase
import com.pitchedapps.frost.db.currentCookie
import com.pitchedapps.frost.facebook.FB_HOME_URL
import com.pitchedapps.frost.facebook.FbItem
-import com.pitchedapps.frost.facebook.USER_AGENT_BASIC
-import com.pitchedapps.frost.facebook.USER_AGENT_FULL
+import com.pitchedapps.frost.facebook.USER_AGENT_DESKTOP
+import com.pitchedapps.frost.facebook.USER_AGENT_MOBILE
import com.pitchedapps.frost.fragments.WebFragment
import com.pitchedapps.frost.utils.Prefs
import com.pitchedapps.frost.utils.ctxCoroutine
@@ -42,7 +42,7 @@ import com.pitchedapps.frost.web.FrostChromeClient
import com.pitchedapps.frost.web.FrostJSI
import com.pitchedapps.frost.web.FrostWebViewClient
import com.pitchedapps.frost.web.NestedWebView
-import com.pitchedapps.frost.web.shouldUseBasicAgent
+import com.pitchedapps.frost.web.shouldUseDesktopAgent
/**
* Created by Allan Wang on 2017-05-29.
@@ -70,10 +70,11 @@ class FrostWebView @JvmOverloads constructor(
@SuppressLint("SetJavaScriptEnabled")
override fun bind(container: FrostContentContainer): View {
userAgentString =
- if (parent.baseEnum == FbItem.MESSAGES || parent.baseUrl.shouldUseBasicAgent) USER_AGENT_BASIC
- else USER_AGENT_FULL
+ if (parent.baseEnum == FbItem.MESSAGES || parent.baseUrl.shouldUseDesktopAgent) USER_AGENT_DESKTOP
+ else USER_AGENT_MOBILE
with(settings) {
javaScriptEnabled = true
+ mediaPlaybackRequiresUserGesture = false // TODO check if we need this
allowFileAccess = true
textZoom = Prefs.webTextScaling
}