-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feature/#22] : 그룹 상세, 약속 확정 뷰 엔티티 수정 #24
Conversation
…into feature/#22-entity-refactor # Conflicts: # presentation/src/main/java/com/sopt/presentation/appointment/AppointmentRoute.kt # presentation/src/main/java/com/sopt/presentation/appointment/AppointmentViewModel.kt
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.
고생하셨습니다! 말씀해주신 부분 확인해봤는데 좋은 아이디어가 떠오르지 않네요..
availableMembers.forEachIndexed { index, member -> | ||
NoostakUserChip( | ||
text = member, | ||
text = if (isAvailable && index == 0) stringResource(id = R.string.user_chip_me) else member, | ||
textColor = NoostakTheme.colors.black, | ||
backgroundColor = if (member == "나") NoostakTheme.colors.blue200 else NoostakTheme.colors.white, | ||
backgroundColor = if (isAvailable && index == 0) NoostakTheme.colors.blue200 else NoostakTheme.colors.white, | ||
borderColor = NoostakTheme.colors.blue200 | ||
) |
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.
P2: 여기 ConfirmedDetail이랑 로직 같은거 같은데 따로 빼서 같이 쓰는건 어때요??
@Composable
fun GenerateUserChips(
members: List<String>,
myIdentity: IdentityEntity
) {
members.forEachIndexed { index, member ->
val isMe = index == 0 && myIdentity.availability == "available"
NoostakUserChip(
text = if (isMe) stringResource(id = R.string.user_chip_me) else member,
textColor = NoostakTheme.colors.black,
backgroundColor = if (isMe) NoostakTheme.colors.blue200 else NoostakTheme.colors.white,
borderColor = NoostakTheme.colors.blue200
)
}
}
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.
할렐루야 ⛪ Amen
unavailableMembers.forEachIndexed { index, member -> | ||
NoostakUserChip( | ||
text = member, | ||
text = if (!isAvailable && index == 0) stringResource(id = R.string.user_chip_me) else member, | ||
textColor = NoostakTheme.colors.gray800, | ||
backgroundColor = if (member == "나") NoostakTheme.colors.blue200 else NoostakTheme.colors.gray200, | ||
borderColor = if (member == "나") NoostakTheme.colors.blue200 else NoostakTheme.colors.gray200 | ||
backgroundColor = if (!isAvailable && index == 0) NoostakTheme.colors.blue200 else NoostakTheme.colors.gray200, | ||
borderColor = if (!isAvailable && index == 0) NoostakTheme.colors.blue200 else NoostakTheme.colors.gray200 | ||
) |
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: 이것도 같이 관리하고 싶었는데 if문 넘 많아서 포기...
✅ 𝗖𝗵𝗲𝗰𝗸-𝗟𝗶𝘀𝘁
📌 𝗜𝘀𝘀𝘂𝗲𝘀
📎 𝗪𝗼𝗿𝗸 𝗗𝗲𝘀𝗰𝗿𝗶𝗽𝘁𝗶𝗼𝗻
📷 𝗦𝗰𝗿𝗲𝗲𝗻𝘀𝗵𝗼𝘁
Screen_recording_20250114_224118.mp4
💬 𝗧𝗼 𝗥𝗲𝘃𝗶𝗲𝘄𝗲𝗿𝘀
계속 기능이 추가되는 느낌이라 명세서에도 놓친 부분이 많더라구요...
일단 명세서 최대한 반영해서 엔티티 수정했습니답..!!
core/util에 CalculateTime 클래스 만들어서 날짜 계산하는 함수 만들어놨는데.. 진행 중, 확정, 약속 상세 뷰에서 날짜 형식이 다 달라서 통일 시켜야 될 것 같아요... 😢 (날짜 통일 관련된건리더 회의 때 얘기해보겠습니답) ISO 8601 날짜 형식에서 필요한 정보만 쏙쏙 뽑을 수 있는 효율적인 로직 작성하는 방법 있으면 알려주세욤...
AppointmentConfirmRoute랑 ConfirmedDetailRoute 보면 유저가 참여 가능한지 불가능한지를 계산해서 "나" 칩으로 보이도록 하는 로직이 있는데 ... 코드가 너무 더러운 것 같아요. 깔끔하게 바꾸는 방법 알려주시면 감사하겠습니답