From 4ada1eddc0ac21e3f5490bc3a9723cd6e855ac67 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 11 Jan 2022 09:56:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/ui/login/WebViewLoginFragment.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt b/app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt index 78eccdec3..f10701ea3 100644 --- a/app/src/main/java/io/legado/app/ui/login/WebViewLoginFragment.kt +++ b/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)