forked from firka/firka
login: Change webview UA to Google Chrome on Android
this should help iOS users blend in with Android users a bit more
This commit is contained in:
@@ -12,6 +12,9 @@ class Constants {
|
||||
"/${initData.devInfo.model}"
|
||||
"/${initData.devInfo.versionRelease}"
|
||||
"/${initData.devInfo.versionSdkInt}";
|
||||
static const webviewUserAgent = "Mozilla/5.0 (Linux; Android 10; K) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||
"Chrome/139.0.0.0 Mobile Safari/537.36";
|
||||
}
|
||||
|
||||
class OmissionConsts {
|
||||
|
||||
@@ -35,6 +35,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
super.initState();
|
||||
|
||||
_webViewController = WebViewController()
|
||||
..setUserAgent(Constants.webviewUserAgent)
|
||||
..setJavaScriptMode(JavaScriptMode.unrestricted)
|
||||
..loadRequest(Uri.parse(KretaEndpoints.kretaLoginUrl))
|
||||
..setNavigationDelegate(NavigationDelegate(
|
||||
|
||||
Reference in New Issue
Block a user