aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-09-07 18:15:53 -0700
committerAllan Wang <me@allanwang.ca>2019-09-07 18:15:53 -0700
commit9363d4bc987cb7b4886ffb6a863b5d14c602e402 (patch)
tree3da405d9012b8a8f0fb58899cd670e60471bf015 /app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
parente736b53094629c4250c536170e938c625f5dc03c (diff)
downloadfrost-9363d4bc987cb7b4886ffb6a863b5d14c602e402.tar.gz
frost-9363d4bc987cb7b4886ffb6a863b5d14c602e402.tar.bz2
frost-9363d4bc987cb7b4886ffb6a863b5d14c602e402.zip
Remove desktop and mobile user agent def
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.kt9
1 files changed, 2 insertions, 7 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 cbcd1054..5b564102 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt
@@ -31,9 +31,7 @@ import com.pitchedapps.frost.contracts.FrostContentParent
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_DESKTOP
-import com.pitchedapps.frost.facebook.USER_AGENT_MOBILE
+import com.pitchedapps.frost.facebook.USER_AGENT
import com.pitchedapps.frost.fragments.WebFragment
import com.pitchedapps.frost.utils.Prefs
import com.pitchedapps.frost.utils.ctxCoroutine
@@ -42,7 +40,6 @@ 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.shouldUseDesktopAgent
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min
@@ -72,9 +69,7 @@ class FrostWebView @JvmOverloads constructor(
@SuppressLint("SetJavaScriptEnabled")
override fun bind(container: FrostContentContainer): View {
- userAgentString =
- if (parent.baseEnum == FbItem.MESSAGES || parent.baseUrl.shouldUseDesktopAgent) USER_AGENT_DESKTOP
- else USER_AGENT_MOBILE
+ userAgentString = USER_AGENT
with(settings) {
javaScriptEnabled = true
mediaPlaybackRequiresUserGesture = false // TODO check if we need this