优化
This commit is contained in:
1 parent
51d88ed4ab
commit
e46527e388
1 file changed
+2
-4
@@ -12,11 +12,9 @@ fun CookieManager.removeCookie(domain: String) {
|
||||
)
|
||||
urls.forEach { url ->
|
||||
val cookieGlob = cm.getCookie(url)
|
||||
cookieGlob.split(";").forEach {
|
||||
cookieGlob.splitNotBlank(";").forEach {
|
||||
val cookieName = it.substringBefore("=")
|
||||
if (cookieName.isEmpty()) {
|
||||
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