Skip to content

Commit

Permalink
fix : firebase image path error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-comlinee committed Dec 15, 2024
1 parent db86567 commit 713fff8
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/src/main/java/com/dna/beyoureyes/model/FirebaseHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,16 @@ class FirebaseHelper {

// 프로필 사진 uri 로드하여 저장
profile?.let{
val storageRef = com.google.firebase.Firebase.storage.reference.child(profile)
storageRef.downloadUrl.await()?.let { // 비동기 작업을 동기적으로 기다림
AppUser.setProfileImgUri(it)
Log.d("RECEIVE_USER_DATA", "${profile}")
try {
val storageRef = com.google.firebase.Firebase.storage.reference.child(profile)
storageRef.downloadUrl.await()?.let { // 비동기 작업을 동기적으로 기다림
AppUser.setProfileImgUri(it)
}
} catch (exception : Exception) {
Log.d("RECEIVE_USER_DATA", "Error getting documents: wrong image path", exception)
}

}

}
Expand Down

0 comments on commit 713fff8

Please sign in to comment.