Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

챌린지 응답 모델 변경, 챌린지 완료 Api 연동 #92

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

soopeach
Copy link
Member

😎 작업 내용

  • 챌린지 응답 모델 변경
    • 상세
    • 프리뷰
  • 챌린지 완료 Api 연동

🧐 변경된 내용

  • 챌린지 응답 모델 변경

🥳 동작 화면

  • 동작 화면 없음

🤯 이슈 번호

  • 이슈 없음

🥲 비고

  • 현재는 도전 중인 챌린지에 임시로 완료하기 버튼을 만들어서 완료 기능을 구현하였음.
    • 추후 완료 기준이 확실해지면 해당 방식으로 수정할 계획

@soopeach soopeach self-assigned this Nov 21, 2024
Copy link
Member

@peter-j0y peter-j0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~!

challenge.accTime,
challenge.badge.toBadge(),
challenge.calorie,
ChallengeType.getChallengeTypeByString(challenge.category ?: String.EMPTY),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit) 다음과 같이 줄여 볼 수 있을 것 같습니다!

Suggested change
ChallengeType.getChallengeTypeByString(challenge.category ?: String.EMPTY),
ChallengeType.getChallengeTypeByString(challenge.category.orEmpty()),

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!! orEmpty 좋네요! 코틀린에서 자체적으로 있는 메서드인가요?

@@ -55,7 +55,9 @@ fun ChallengeGoalContent(

val progressBarColor = challengeColor.progressBarColor

val progress = if (challenge.process == null) 0f else requireNotNull(challenge.process) / 100f
val progress =
if (challenge.progress == null) 0f else requireNotNull(challenge.progress) / 100f
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 로직상 문제는 없지만 중복 null 체크 인 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다!!

@yonghanJu yonghanJu merged commit 4b0e4e1 into compose/develop Nov 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants