-
Notifications
You must be signed in to change notification settings - Fork 1
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
[FIX/#247] 홈 뷰 / 추가 수정사항 반영 #256
Conversation
# Conflicts: # core/src/main/java/com/terning/core/designsystem/component/bottomsheet/SortingBottomSheet.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.
확인했습니당 마지막까지 수고 많았어요ㅜㅜ!!
with(homeUpcomingInternState.data) { | ||
if (!hasScrapped) { | ||
HomeUpcomingEmptyFilter() | ||
} else if (homeUpcomingInternDetail.isEmpty()) { | ||
HomeUpcomingEmptyIntern(navigateToCalendar = navigateToCalendar) | ||
} else { | ||
HomeUpcomingInternScreen( | ||
internList = homeUpcomingInternDetail, | ||
homeState = homeState, | ||
navigateToIntern = navigateToIntern | ||
) | ||
} |
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.
개인적으로 저는 조건문이 3개 이상인 경우는 when문으로 사용하는 것이 좀 더 코틀린스러워서 그렇게 하고 있답니당 참고만해주세요!
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.
앗하 지금보니 when문 사용하는게 훨씬 더 낫겠네요!!! 감사합니다💗
viewModel.updateRecommendDialogVisibility(false) | ||
if (it) { | ||
viewModel.getRecommendInternsData( | ||
sortBy = homeState.sortBy.ordinal, | ||
startYear = homeFilteringInfo.startYear | ||
?: Calendar.getInstance().currentYear, | ||
startMonth = homeFilteringInfo.startMonth | ||
?: Calendar.getInstance().currentMonth, | ||
) | ||
viewModel.getHomeUpcomingInternList() |
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.
나중에 리팩할 때 뷰모델 관련 로직은 screen 함수랑 분리해보는 것도 좋을 것 같아요..!
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.
너어어어어무 고생하셨습니다~~~~~~~~~~~~~~~~~~~~~~~
startMonth = homeFilteringInfo.startMonth | ||
?: Calendar.getInstance().currentMonth, | ||
) | ||
if (it) { |
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.
람다에 변수가 있을 땐 이름을 붙여주면 코드가 더 직관적이고 잘 읽히더라구요!
지금같이 it
을 쓰는 것보단 쓰임새에 맞게 이름을 붙여주는걸 습관화하면 좋을 것 같아요~~
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.
고생많았어용 홈ㅁ뷰 ..🫶🏻
⛳️ Work Description
📸 Screenshot
Screen_Recording_20240922_041843_terning.mp4
📢 To Reviewers