diff --git a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt index 653c3b0a1..6a16a8411 100644 --- a/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt +++ b/app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt @@ -434,15 +434,11 @@ class AnalyzeUrl( } fun getGlideUrl(): Any? { - var glideUrl: Any = urlHasQuery - if (headerMap.isNotEmpty()) { - val headers = LazyHeaders.Builder() - headerMap.forEach { (key, value) -> - headers.addHeader(key, value) - } - glideUrl = GlideUrl(urlHasQuery, headers.build()) + val headers = LazyHeaders.Builder() + headerMap.forEach { (key, value) -> + headers.addHeader(key, value) } - return glideUrl + return GlideUrl(urlHasQuery, headers.build()) } data class UrlOption(