-
Notifications
You must be signed in to change notification settings - Fork 1
챌린지 상세 페이지에서 도전 내용 인디케이터 변경 사항 반영 #95
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
Conversation
166a6ef to
7b99c6a
Compare
peter-j0y
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 👍
| val progressBarColor = challengeColor.progressBarColor | ||
|
|
||
| val progress = | ||
| if (challenge.progress == null) 0f else requireNotNull(challenge.progress) / 100f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
requireNotNull을 쓰면 challenge.progress가 null이면 exception 나지 않나요? 아마 challenge.progress는 nullable한 상황이라 사용하셨을 것 같은데 다음과 같은 방식은 어떨까요?
| if (challenge.progress == null) 0f else requireNotNull(challenge.progress) / 100f | |
| val challengeProgress = challenge.progress | |
| if (challengProgress == null) 0f else challenge.progress / 100f |
| goal = "목표", | ||
| limit = when (challenge.challengeType) { | ||
| ChallengeType.LIFE -> { | ||
| "연속 " + challenge.period.toString() + "일" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit) "연속 ${challenge.period}일"로 하면 더 간결하게 할 수 있을 것 같아요!
| ) | ||
|
|
||
| Text( | ||
| text = "${deadLineInfo[0]}일 ${deadLineInfo[1]}시간 ${deadLineInfo[2]}분" + "남음", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index exception이 날 수도 있을 것 같아서 default 값이 있으면 좋을 것 같긴하네요!
😎 작업 내용
🧐 변경된 내용
🥳 동작 화면
🤯 이슈 번호
🥲 비고