Skip to content

Commit 341a049

Browse files
committed
[fix]#208: 이미지 선택 안했을시 문제 수정
1 parent 9788d28 commit 341a049

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

feature/auth/src/main/kotlin/com/bff/wespot/auth/screen/ImageScreen.kt

+9-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ internal fun ImageScreen(
5959

6060
val pickImage =
6161
rememberLauncherForActivityResult(contract = ActivityResultContracts.PickVisualMedia()) {
62-
action(AuthAction.ChangeImage(it.toString()))
62+
it?.let {
63+
action(AuthAction.ChangeImage(it.toString()))
64+
}
6365
}
6466

6567
Scaffold(
@@ -122,7 +124,12 @@ internal fun ImageScreen(
122124
Text(
123125
text = stringResource(id = com.bff.wespot.ui.R.string.introduction),
124126
style = StaticTypeScale.Default.body4,
125-
modifier = Modifier.padding(top = 22.dp, bottom = 12.dp, start = 10.dp, end = 10.dp),
127+
modifier = Modifier.padding(
128+
top = 22.dp,
129+
bottom = 12.dp,
130+
start = 10.dp,
131+
end = 10.dp
132+
),
126133
)
127134

128135
WsTextField(

feature/entire/src/main/java/com/bff/wespot/entire/screen/edit/ProfileEditScreen.kt

+10-4
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,15 @@ fun ProfileEditScreen(
9999
val action = viewModel::onAction
100100
val state by viewModel.collectAsState()
101101

102+
var showBottomSheet by remember {
103+
mutableStateOf(false)
104+
}
105+
102106
val pickImage =
103107
rememberLauncherForActivityResult(contract = ActivityResultContracts.PickVisualMedia()) {
104-
action(EntireEditAction.OnProfileImagePicked(it.toString()))
108+
it?.let {
109+
action(EntireEditAction.OnProfileImagePicked(it.toString()))
110+
}
105111
}
106112

107113
handleSideEffect(viewModel.sideEffect)
@@ -217,15 +223,15 @@ fun ProfileEditScreen(
217223
contentAlignment = Alignment.BottomCenter,
218224
) {
219225
val isEdited = state.profile.introduction != state.introductionInput ||
220-
state.profilePath != state.profile.profileCharacter.iconUrl
226+
state.profilePath != state.profile.profileCharacter.iconUrl
221227
WSButton(
222228
onClick = {
223229
action(EntireEditAction.OnProfileEditDoneButtonClicked)
224230
},
225231
enabled =
226-
isEdited &&
232+
isEdited &&
227233
state.hasProfanity.not() &&
228-
state.introductionInput.length in 1..20,
234+
state.introductionInput.length in 0..20,
229235
text = stringResource(id = R.string.edit_done),
230236
content = { it() },
231237
)

0 commit comments

Comments
 (0)