Код: Выделить всё
suspend fun getUserProfile(): UserInfo?
{
val start = Clock.System.now()
val result = firestore.collection("User").document(auth.currentUser!!.uid).snapshots
.mapLatest { user ->
user.data()
}
.firstOrNull()
val end = Clock.System.now()
println("time: ${(end-start).inWholeMilliseconds}")
return result
}
Я использую последнюю версию Firebase Kotlin SDK.
Спасибо за помощь.
Подробнее здесь: https://stackoverflow.com/questions/793 ... d-than-ios
Мобильная версия