diff options
author | Allan Wang <me@allanwang.ca> | 2019-04-13 19:52:24 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-13 19:52:24 -0400 |
commit | e8c52e6ab127dae71d51b7b54c98bfd724568de3 (patch) | |
tree | 44b5a182e95afa8400a365d0bd35071ea22cc4cf /app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt | |
parent | bf84c42b083153701c4f9d4c96f0a3399e01c37f (diff) | |
download | frost-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/activities/WebOverlayActivity.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt index 1ea655d1..accf9d98 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/WebOverlayActivity.kt @@ -58,7 +58,7 @@ import com.pitchedapps.frost.enums.OverlayContext import com.pitchedapps.frost.facebook.FB_URL_BASE import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem -import com.pitchedapps.frost.facebook.USER_AGENT_BASIC +import com.pitchedapps.frost.facebook.USER_AGENT_DESKTOP import com.pitchedapps.frost.facebook.formattedFbUrl import com.pitchedapps.frost.kotlin.subscribeDuringJob import com.pitchedapps.frost.services.FrostRunnable @@ -141,10 +141,10 @@ class FrostWebActivity : WebOverlayActivityBase(false) { } /** - * Variant that forces a basic user agent. This is largely internal, + * Variant that forces a desktop user agent. This is largely internal, * and is only necessary when we are launching from an existing [WebOverlayActivityBase] */ -class WebOverlayBasicActivity : WebOverlayActivityBase(true) +class WebOverlayDesktopActivity : WebOverlayActivityBase(true) /** * Internal overlay for the app; this is tied with the main task and is singleTop as opposed to singleInstance @@ -153,7 +153,7 @@ class WebOverlayActivity : WebOverlayActivityBase(false) @SuppressLint("Registered") @UseExperimental(ExperimentalCoroutinesApi::class) -open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseActivity(), +open class WebOverlayActivityBase(private val forceDesktopAgent: Boolean) : BaseActivity(), ActivityContract, FrostContentContainer, VideoViewHolder, FileChooserContract by FileChooserDelegate() { @@ -210,8 +210,8 @@ open class WebOverlayActivityBase(private val forceBasicAgent: Boolean) : BaseAc } with(web) { - if (forceBasicAgent) //todo check; the webview already adds it dynamically - userAgentString = USER_AGENT_BASIC + if (forceDesktopAgent) //todo check; the webview already adds it dynamically + userAgentString = USER_AGENT_DESKTOP Prefs.prevId = Prefs.userId launch { if (userId != Prefs.userId) |