From e4dde5cced58992a6f962b6dde7cf7e87b3551d7 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sat, 24 Oct 2020 09:16:29 +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/JsExtensions.kt | 4 ++-- .../main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/JsExtensions.kt b/app/src/main/java/io/legado/app/help/JsExtensions.kt index f42828476..0984a01d9 100644 --- a/app/src/main/java/io/legado/app/help/JsExtensions.kt +++ b/app/src/main/java/io/legado/app/help/JsExtensions.kt @@ -3,8 +3,8 @@ package io.legado.app.help import android.util.Base64 import androidx.annotation.Keep import io.legado.app.constant.AppConst.dateFormat -import io.legado.app.help.http.SSLHelper import io.legado.app.help.http.CookieStore +import io.legado.app.help.http.SSLHelper import io.legado.app.model.analyzeRule.AnalyzeUrl import io.legado.app.utils.* import org.jsoup.Connection @@ -127,7 +127,7 @@ interface JsExtensions { val cookie = CookieStore.getCookie(tag) val cookieMap = CookieStore.cookieToMap(cookie) return if (key != null) { - cookieMap.get(key) ?: "" + cookieMap[key] ?: "" } else { cookie } 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 a7eb08968..3cbc2b44f 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 @@ -282,7 +282,7 @@ class AnalyzeUrl( val cookie = CookieStore.getCookie(tag) if (cookie.isNotEmpty()) { val cookieMap = CookieStore.cookieToMap(cookie) - val customCookieMap = CookieStore.cookieToMap(headerMap.get("Cookie") ?: "") + val customCookieMap = CookieStore.cookieToMap(headerMap["Cookie"] ?: "") cookieMap.putAll(customCookieMap) val newCookie = CookieStore.mapToCookie(cookieMap) newCookie?.let { @@ -321,7 +321,7 @@ class AnalyzeUrl( val cookie = CookieStore.getCookie(tag) if (cookie.isNotEmpty()) { val cookieMap = CookieStore.cookieToMap(cookie) - val customCookieMap = CookieStore.cookieToMap(headerMap.get("Cookie") ?: "") + val customCookieMap = CookieStore.cookieToMap(headerMap["Cookie"] ?: "") cookieMap.putAll(customCookieMap) val newCookie = CookieStore.mapToCookie(cookieMap) newCookie?.let { @@ -369,7 +369,7 @@ class AnalyzeUrl( val cookie = CookieStore.getCookie(tag) if (cookie.isNotEmpty()) { val cookieMap = CookieStore.cookieToMap(cookie) - val customCookieMap = CookieStore.cookieToMap(headerMap.get("Cookie") ?: "") + val customCookieMap = CookieStore.cookieToMap(headerMap["Cookie"] ?: "") cookieMap.putAll(customCookieMap) val newCookie = CookieStore.mapToCookie(cookieMap) newCookie?.let {