add getKey function to CookieStore

pull/22/head
风月残烛 3 years ago committed by GitHub
parent c7578f8ba5
commit 24ba2c5da0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      app/src/main/java/xyz/fycz/myreader/greendao/service/CookieStore.kt

@ -53,6 +53,12 @@ object CookieStore : CookieManager {
return cookieBean?.cookie ?: ""
}
fun getKey(url: String, key: String): String {
val cookie = getCookie(url)
val cookieMap = cookieToMap(cookie)
return cookieMap[key] ?: ""
}
override fun removeCookie(url: String) {
DbManager.getDaoSession().cookieBeanDao.deleteByKey(NetworkUtils.getSubDomain(url))
}

Loading…
Cancel
Save