pull/1705/head
kunfei 3 years ago
parent 92be241a49
commit d52ea2be60
  1. 12
      app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt

@ -54,12 +54,12 @@ class WebViewLoginFragment : BaseFragment(R.layout.fragment_web_view_login) {
@SuppressLint("SetJavaScriptEnabled")
private fun initWebView(source: BaseSource) {
val settings = binding.webView.settings
settings.setSupportZoom(true)
settings.builtInZoomControls = true
settings.javaScriptEnabled = true
source.getHeaderMap()[AppConst.UA_NAME]?.let {
settings.userAgentString = it
binding.webView.settings.apply {
builtInZoomControls = true
javaScriptEnabled = true
source.getHeaderMap()[AppConst.UA_NAME]?.let {
userAgentString = it
}
}
val cookieManager = CookieManager.getInstance()
source.loginUrl?.let {

Loading…
Cancel
Save