Skip to content

Commit

Permalink
Merge pull request #91 from ERICA-gamsung/feature/#90
Browse files Browse the repository at this point in the history
Fix: SelectPostScreen PreviewPost 이동에서 선택했던 이미지 view에서 보여지는 것 수정
  • Loading branch information
JJongmen authored Jun 2, 2024
2 parents 762418d + b243518 commit 849cf69
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 849cf69

Please sign in to comment.