diff options
author | Allan Wang <me@allanwang.ca> | 2019-04-21 20:22:11 -0400 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-04-21 20:22:11 -0400 |
commit | bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08 (patch) | |
tree | 354b0bb6f021af54d1e3586e3e9bda064ad4ef02 /app/src/main/kotlin/com/pitchedapps/frost/views | |
parent | e5eb928feacba8d1c634ad8e5d85259ae161cabd (diff) | |
parent | f0f95295bdb2b853aa6262ec4bed2353ce326eee (diff) | |
download | frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.tar.gz frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.tar.bz2 frost-bbafb7b65ce655c1fdda8badd3098d2a0e1f7f08.zip |
Merge dev
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/views')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt | 2 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/views/FrostWebView.kt | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt index 07eaed0a..0269b1a9 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/views/AccountItem.kt @@ -53,7 +53,7 @@ class AccountItem(val cookie: CookieEntity?) : KauIItem<AccountItem, AccountItem if (cookie != null) { text.text = cookie.name GlideApp.with(itemView).load(profilePictureUrl(cookie.id)) - .transform(FrostGlide.roundCorner).listener(object : RequestListener<Drawable> { + .transform(FrostGlide.circleCrop).listener(object : RequestListener<Drawable> { override fun onResourceReady( resource: Drawable?, model: Any?, 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 } |