Fix WebView user-agent (fixes #7306)

The `source.headers.toMultimap()` call in WebViewActivity makes all the names lowercase.
This commit is contained in:
arkon 2022-06-15 18:05:56 -04:00
parent a446b37c1f
commit 284880d096

View File

@ -44,7 +44,7 @@ fun WebViewScreen(
onClearCookies: (String) -> Unit,
) {
val context = LocalContext.current
val state = rememberWebViewState(url = url)
val state = rememberWebViewState(url = url, additionalHttpHeaders = headers)
val navigator = rememberWebViewNavigator()
Column {
@ -144,7 +144,7 @@ fun WebViewScreen(
WebView.setWebContentsDebuggingEnabled(true)
}
headers["User-Agent"]?.let {
headers["user-agent"]?.let {
webView.settings.userAgentString = it
}
},