Minor cleanup
This commit is contained in:
parent
ecc0082db0
commit
88bccfc015
1 changed files with 4 additions and 6 deletions
|
|
@ -213,13 +213,11 @@ class EhLoginActivity : BaseActivity() {
|
|||
*/
|
||||
fun checkLoginCookies(url: String): Boolean {
|
||||
getCookies(url)?.let { parsed ->
|
||||
return parsed.filter {
|
||||
(
|
||||
it.name.equals(MEMBER_ID_COOKIE, ignoreCase = true) ||
|
||||
it.name.equals(PASS_HASH_COOKIE, ignoreCase = true)
|
||||
) &&
|
||||
return parsed.count {
|
||||
(it.name.equals(MEMBER_ID_COOKIE, ignoreCase = true) ||
|
||||
it.name.equals(PASS_HASH_COOKIE, ignoreCase = true)) &&
|
||||
it.value.isNotBlank()
|
||||
}.count() >= 2
|
||||
} >= 2
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue