Skip to content

Commit

Permalink
[CHORE] #128 : 이전 버튼 클릭시 답변 수정되도록 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Feb 27, 2024
1 parent 77d2893 commit 8207a08
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.wap.designsystem.WappTheme
import com.wap.designsystem.component.WappSubTopBar
import com.wap.wapp.core.commmon.extensions.toSupportingText
import com.wap.wapp.core.designresource.R.drawable
import com.wap.wapp.core.model.survey.Rating
import com.wap.wapp.core.model.survey.SurveyForm
import com.wap.wapp.feature.survey.R
Expand Down Expand Up @@ -65,6 +66,7 @@ internal fun SurveyAnswerScreen(
titleRes = R.string.survey_answer,
showLeftButton = true,
modifier = Modifier.padding(top = 16.dp), // 하단은 Content Padding에 의존
leftButtonDrawableRes = drawable.ic_close,
onClickLeftButton = {
when (surveyAnswerState) {
SurveyAnswerState.SURVEY_OVERVIEW -> navigateToSurvey()
Expand Down Expand Up @@ -112,6 +114,8 @@ internal fun SurveyAnswerScreen(
// 응답의 갯수가 질문의 갯수보다 작은 경우
if (questionNumber >= surveyAnswerList.size) {
viewModel.addSurveyAnswer()
} else {
viewModel.editSurveyAnswer()
}
viewModel.setPreviousQuestionAndAnswer()
},
Expand Down

0 comments on commit 8207a08

Please sign in to comment.