From 268c6e2e4c0cce81f897d6bd1e88edc23a9afca1 Mon Sep 17 00:00:00 2001 From: nbransby Date: Thu, 22 Oct 2020 20:06:29 +0100 Subject: [PATCH] remove apply in android updateProfile --- .../androidMain/kotlin/dev/gitlive/firebase/auth/user.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/user.kt b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/user.kt index e8b6297b3..5b97bcdd6 100644 --- a/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/user.kt +++ b/firebase-auth/src/androidMain/kotlin/dev/gitlive/firebase/auth/user.kt @@ -46,10 +46,10 @@ actual class FirebaseUser internal constructor(val android: com.google.firebase. actual suspend fun updatePassword(password: String) = android.updatePassword(password).await().run { Unit } actual suspend fun updatePhoneNumber(credential: PhoneAuthCredential) = android.updatePhoneNumber(credential.android).await().run { Unit } actual suspend fun updateProfile(displayName: String?, photoUrl: String?) { - val request = UserProfileChangeRequest.Builder().apply { - this.displayName = displayName - photoUri = photoURL?.let { Uri.parse(it) } - }.build() + val request = UserProfileChangeRequest.Builder() + .setDisplayName(displayName) + .setPhotoUri(photoURL?.let { Uri.parse(it) }) + .build() android.updateProfile(request).await() } actual suspend fun verifyBeforeUpdateEmail(newEmail: String, actionCodeSettings: ActionCodeSettings?) =