fixed invalid account condition

This commit is contained in:
Mariotaku Lee 2017-04-28 10:08:47 +08:00
parent c86c9eb79a
commit e5cd398af3
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ fun Account.isOfficial(am: AccountManager, context: Context): Boolean {
fun AccountManager.hasInvalidAccount(): Boolean {
val accounts = AccountUtils.getAccounts(this)
if (accounts.isEmpty()) return false
return accounts.none { isAccountValid(it) }
return accounts.any { !isAccountValid(it) }
}
fun AccountManager.isAccountValid(account: Account): Boolean {