Skip to content

Commit

Permalink
Merge pull request #281 from TeamDATEROAD/fix-profile-null
Browse files Browse the repository at this point in the history
[fix] 프로필 수정/등록 이미지 null 처리 로직 수정
  • Loading branch information
jihyunniiii authored Oct 15, 2024
2 parents 39a32b2 + 2b5883a commit 2c3aaf4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
compileSdk = "34"
minSdk = "28"
targetSdk = "34"
versionCode = "1"
versionCode = "2"
versionName = "1.0.0"
jvmTarget = "1.8"
kotlinCompilerExtensionVersion = "1.5.13"
Expand Down

0 comments on commit 2c3aaf4

Please sign in to comment.