Skip to content

Commit

Permalink
[CHORE] #95 : 병합 충돌 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongjaino committed Feb 6, 2024
1 parent c19ab64 commit 1bfc1f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 27 deletions.
1 change: 1 addition & 0 deletions app/src/main/java/com/wap/wapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ private fun handleBottomBarState(
ManagementSurveyRoute.surveyFormRegistrationRoute -> setBottomBarState(false)
eventRegistrationNavigationRoute -> setBottomBarState(false)
SurveyRoute.answerRoute("{id}") ->setBottomBarState(false)
ManagementSurveyRoute.surveyFormEditRoute("{id}") -> setBottomBarState(false)
else -> setBottomBarState(true)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ internal fun SurveyAnswerForm(
modifier = Modifier.weight(1f),
)

SurveyAnswerButton(
isLastQuestion = isLastQuestion,
onButtonClicked = onNextQuestionButtonClicked,
WappButton(
textRes = if (isLastQuestion) R.string.submit else R.string.next,
onClick = { onNextQuestionButtonClicked() },
isEnabled = checkQuestionTypeAndSubjectiveAnswer(
questionType = surveyQuestion.questionType,
subjectiveAnswer = subjectiveAnswer,
Expand All @@ -79,30 +79,6 @@ internal fun SurveyAnswerForm(
}
}

@Composable
private fun SurveyAnswerButton(
isLastQuestion: Boolean,
isEnabled: Boolean,
onButtonClicked: () -> Unit,
modifier: Modifier,
) {
if (isLastQuestion) {
WappButton(
textRes = R.string.submit,
onClick = { onButtonClicked() },
isEnabled = isEnabled,
modifier = modifier,
)
} else {
WappButton(
textRes = R.string.next,
onClick = { onButtonClicked() },
isEnabled = isEnabled,
modifier = modifier,
)
}
}

private fun checkQuestionTypeAndSubjectiveAnswer(
questionType: QuestionType,
subjectiveAnswer: String,
Expand Down

0 comments on commit 1bfc1f4

Please sign in to comment.