-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature/#5] : 소요시간 이하 입력 방지 #6
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
youjin09222
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.
엄청 까다로웠을 텐데 진짜 고생 많았으어🥺
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.
P3: 체크박스 컴포넌트로 따로 빼놓은거 너무 좋습니다!
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.
P3 : 히히 체크박스도 생겻다 감사함니두
| NoostakAndroidTheme { | ||
| NoostakCheckbox( | ||
| isChecked = true, | ||
| text = "체크박스블라블라" |
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.
P3: 이거 뭔디 ㅋㅋㅋㅋㅋ
| isChecked = isChecked, | ||
| onCheckedChange = { | ||
| isChecked = it | ||
| if (isChecked) selectedData = emptyList() |
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.
P3: 오호 체크 박스 선택 시 이렇게 초기화했구나! 베리굿!
| return false | ||
| } | ||
|
|
||
| val sorted = selectedDate.sortedBy { LocalDateTime.parse(it.startTime) } |
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.
P3: 시간 정렬하는 방법 너무 좋은디!
| val finalBlockDuration = Duration.between(currentStart, currentEnd).toHours() | ||
| if (finalBlockDuration < duration) { | ||
| emitSideEffect(AppointmentCheckSideEffect.ShowSnackBar(R.string.sb_appointment_check_invalid)) | ||
| return false | ||
| } |
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.
P3: 마지막 블록까지 꼼꼼히 체크한 거 너무 좋습니다!
| for (i in 1 until sorted.size) { | ||
| val nextStart = LocalDateTime.parse(sorted[i].startTime) | ||
| val nextEnd = LocalDateTime.parse(sorted[i].endTime) | ||
|
|
||
| if (nextStart == currentEnd) { | ||
| currentEnd = nextEnd | ||
| } else { | ||
| // 블록이 끊기면 검사 | ||
| val blockDuration = Duration.between(currentStart, currentEnd).toHours() | ||
| if (blockDuration < duration) { | ||
| emitSideEffect(AppointmentCheckSideEffect.ShowSnackBar(R.string.sb_appointment_check_invalid)) | ||
| return false | ||
| } | ||
| currentStart = nextStart | ||
| currentEnd = nextEnd | ||
| } | ||
| } |
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.
P3: 오 이렇게 연속 여부 판단했구나 대단한디?
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.
지피티는 정말 대단한 친구야 흙흙
twogarlic
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.
어푸어푸 ~
✅ 𝗖𝗵𝗲𝗰𝗸-𝗟𝗶𝘀𝘁
📌 𝗜𝘀𝘀𝘂𝗲𝘀
📎 𝗪𝗼𝗿𝗸 𝗗𝗲𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻
📷 𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁
default.mp4
💬 𝗧𝗼 𝗥𝗲𝘃𝗶𝗲𝘄𝗲𝗿𝘀
체크박스 컴포넌트 만들어서 하늘언니 약속 생성 부분 코드 수정했어요 @twogarlic