优化
This commit is contained in:
@@ -11,8 +11,8 @@ fun CookieManager.removeCookie(domain: String) {
|
|||||||
"https://$domain"
|
"https://$domain"
|
||||||
)
|
)
|
||||||
urls.forEach { url ->
|
urls.forEach { url ->
|
||||||
val cookieGlob = cm.getCookie(url)
|
val cookieGlob: String? = cm.getCookie(url)
|
||||||
cookieGlob.splitNotBlank(";").forEach {
|
cookieGlob?.splitNotBlank(";")?.forEach {
|
||||||
val cookieName = it.substringBefore("=")
|
val cookieName = it.substringBefore("=")
|
||||||
cm.setCookie(url, "$cookieName=; Expires=Wed, 31 Dec 2000 23:59:59 GMT")
|
cm.setCookie(url, "$cookieName=; Expires=Wed, 31 Dec 2000 23:59:59 GMT")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user