RoomList: add avatar for rooms and date formatting

This commit is contained in:
ganfra 2022-11-02 19:04:29 +01:00
parent 1801bcfcd3
commit 9037b9b66b
16 changed files with 244 additions and 61 deletions

View file

@ -0,0 +1,9 @@
package io.element.android.x.core.data
import kotlinx.coroutines.async
import kotlinx.coroutines.awaitAll
import kotlinx.coroutines.coroutineScope
suspend fun <A, B> Iterable<A>.parallelMap(f: suspend (A) -> B): List<B> = coroutineScope {
map { async { f(it) } }.awaitAll()
}