Skip to content

Commit

Permalink
Fix: SelectPostScreen PreviewPost 이동에서 선택했던 이미지 view에서 보여지는 것 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
johnhuh619 committed Jun 2, 2024
1 parent 762418d commit b243518
Showing 1 changed file with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,23 +257,22 @@ fun PicSection(
.clickable { imagePickerLauncher.launch("image/*") },
contentAlignment = Alignment.Center,
) {
if (selectedImageUri.value == null) {
if (imgBitmap == null) {
Button(onClick = { imagePickerLauncher.launch("image/*") }) {
Text("사진 업로드")
}
} else {
imgBitmap?.let {
Image(
bitmap = it.asImageBitmap(),
contentDescription = "Selected Image",
modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.Crop,
)
} ?: run {
Button(onClick = { imagePickerLauncher.launch("image/*") }) {
Text("사진 업로드")
}
}
Image(
bitmap = imgBitmap.asImageBitmap(),
contentDescription = "Selected Image",
modifier = Modifier.fillMaxSize(),
contentScale = ContentScale.Crop,
)
// ) ?: run {
// Button(onClick = { imagePickerLauncher.launch("image/*") }) {
// Text("사진 업로드")
// }
// }
}
}
}
Expand Down

0 comments on commit b243518

Please sign in to comment.