1
0
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:
2025-08-29 10:11:34 +02:00
parent ad058d939c
commit ec24951bdf
2 changed files with 4 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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(