From 1f76fd156f96e47e1e890de571d3b18b8ebe6bd2 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 7 Mar 2022 08:09:08 +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 --- app/src/main/java/io/legado/app/help/http/BackstageWebView.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt b/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt index 925c0174e..ab2e63503 100644 --- a/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt +++ b/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt @@ -9,6 +9,7 @@ import android.webkit.WebSettings import android.webkit.WebView import android.webkit.WebViewClient import io.legado.app.constant.AppConst +import io.legado.app.help.config.AppConfig import io.legado.app.model.NoStackTraceException import io.legado.app.utils.runOnUI import kotlinx.coroutines.Runnable @@ -94,7 +95,7 @@ class BackstageWebView( settings.javaScriptEnabled = true settings.domStorageEnabled = true settings.blockNetworkImage = true - settings.userAgentString = headerMap?.get(AppConst.UA_NAME) + settings.userAgentString = headerMap?.get(AppConst.UA_NAME) ?: AppConfig.userAgent settings.mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW if (sourceRegex.isNullOrEmpty()) { webView.webViewClient = HtmlWebViewClient()