Skip to content

Commit

Permalink
[fix] #280 프로필 수정/등록 이미지 null 처리 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jihyunniiii committed Oct 15, 2024
1 parent 4324cc9 commit 2b5883a
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,17 @@ fun ProfileRoute(
val lifecycleOwner = LocalLifecycleOwner.current

val getGalleryLauncher = rememberLauncherForActivityResult(ActivityResultContracts.GetContent()) { uri: Uri? ->
viewModel.setEvent(ProfileContract.ProfileEvent.SetSignUpImage(image = uri.toString()))
viewModel.setEvent(ProfileContract.ProfileEvent.SetEditProfileImage(image = uri.toString()))
uri?.let {
viewModel.setEvent(ProfileContract.ProfileEvent.SetSignUpImage(image = it.toString()))
viewModel.setEvent(ProfileContract.ProfileEvent.SetEditProfileImage(image = it.toString()))
}
}

val getPhotoPickerLauncher = rememberLauncherForActivityResult(ActivityResultContracts.PickVisualMedia()) { uri: Uri? ->
viewModel.setEvent(ProfileContract.ProfileEvent.SetSignUpImage(image = uri.toString()))
viewModel.setEvent(ProfileContract.ProfileEvent.SetEditProfileImage(image = uri.toString()))
uri?.let {
viewModel.setEvent(ProfileContract.ProfileEvent.SetSignUpImage(image = it.toString()))
viewModel.setEvent(ProfileContract.ProfileEvent.SetEditProfileImage(image = it.toString()))
}
}

LaunchedEffect(Unit) {
Expand Down

0 comments on commit 2b5883a

Please sign in to comment.