pull/1515/head
gedoor 3 years ago
parent 4659a86092
commit 4ada1eddc0
  1. 3
      app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt

@ -62,6 +62,9 @@ class WebViewLoginFragment : BaseFragment(R.layout.fragment_web_view_login) {
settings.userAgentString = it
}
val cookieManager = CookieManager.getInstance()
source.loginUrl?.let {
cookieManager.setCookie(it, CookieStore.getCookie(it))
}
binding.webView.webViewClient = object : WebViewClient() {
override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
val cookie = cookieManager.getCookie(url)

Loading…
Cancel
Save