This commit is contained in:
Mariotaku Lee 2017-06-01 17:04:17 +08:00
parent 039a022593
commit 6a4138be92
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 1 additions and 0 deletions

View File

@ -31,6 +31,7 @@ fun Mastodon.batchGetRelationships(ids: Collection<String>): Map<String, Relatio
@Suppress("LoopToCallChain")
for (i in indices step 100) {
val batch = list.subArray(i until (i + 100).coerceAtMost(indices.last))
if (batch.isEmpty()) continue
getRelationships(batch).forEach {
result[it.id] = it
}