aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-08-07 23:07:40 -0700
committerAllan Wang <me@allanwang.ca>2019-08-07 23:07:40 -0700
commit6ab5ee6c839993b5340304dc86d4f43820b734fe (patch)
tree168f678030fa48c99248a41b04bdba65eb309b88 /app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
parente64c30732b5156144f18db41fcf5a713b1d11deb (diff)
downloadfrost-6ab5ee6c839993b5340304dc86d4f43820b734fe.tar.gz
frost-6ab5ee6c839993b5340304dc86d4f43820b734fe.tar.bz2
frost-6ab5ee6c839993b5340304dc86d4f43820b734fe.zip
Add user agent toggle
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
index f6316470..a83af46c 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbConst.kt
@@ -16,6 +16,8 @@
*/
package com.pitchedapps.frost.facebook
+import com.pitchedapps.frost.utils.Prefs
+
/**
* Created by Allan Wang on 2017-06-01.
*/
@@ -32,8 +34,8 @@ const val FB_HOME_URL = "${FB_URL_BASE}home.php"
const val USER_AGENT_MOBILE =
"Mozilla/5.0 (Linux; Android 8.0.0; ONEPLUS A3000) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Mobile Safari/537.36"
// Desktop agent, for pages like messages
-const val USER_AGENT_DESKTOP =
- "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Safari/537.36"
+val USER_AGENT_DESKTOP =
+ if (Prefs.singleUserAgent) USER_AGENT_MOBILE else "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.90 Safari/537.36"
/**
* Animation transition delay, just to ensure that the styles