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-13 19:52:24 -0400
committerGitHub <noreply@github.com>2019-04-13 19:52:24 -0400
commite8c52e6ab127dae71d51b7b54c98bfd724568de3 (patch)
tree44b5a182e95afa8400a365d0bd35071ea22cc4cf /app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
parentbf84c42b083153701c4f9d4c96f0a3399e01c37f (diff)
downloadfrost-e8c52e6ab127dae71d51b7b54c98bfd724568de3.tar.gz
frost-e8c52e6ab127dae71d51b7b54c98bfd724568de3.tar.bz2
frost-e8c52e6ab127dae71d51b7b54c98bfd724568de3.zip
Update user agent (#1400)
* Rename user agent and update chrome for desktop, resolves #1387 * Rename more basic to desktop * Apply spotless
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.kt10
1 files changed, 5 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 37b2234d..cc8e3fbc 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
@@ -29,8 +29,8 @@ import com.pitchedapps.frost.contracts.FrostContentCore
import com.pitchedapps.frost.contracts.FrostContentParent
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.frostDownload
@@ -38,7 +38,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.
@@ -66,8 +66,8 @@ 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