Update libraries, some lints (#4099)

* Update some plugins

* Fix some miscellaneous lints
This commit is contained in:
Taco
2020-12-08 22:21:08 -05:00
committed by GitHub
parent 08ab7f6aa0
commit c2b8fea291
31 changed files with 42 additions and 59 deletions
@@ -149,13 +149,9 @@ class MyAnimeList(private val context: Context, id: Int) : TrackService(id) {
private fun saveCSRF(csrf: String) = preferences.trackToken(this).set(csrf)
private fun checkCookies(): Boolean {
var ckCount = 0
val url = BASE_URL.toHttpUrlOrNull()!!
for (ck in networkService.cookieManager.get(url)) {
if (ck.name == USER_SESSION_COOKIE || ck.name == LOGGED_IN_COOKIE) {
ckCount++
}
}
val ckCount = networkService.cookieManager.get(url).count {
it.name == USER_SESSION_COOKIE || it.name == LOGGED_IN_COOKIE }
return ckCount == 2
}