Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
refactor: 카테고리, 일시 선택 순서 변경 및 리팩터링 (스타카토 생성/수정) #564 #567
base: develop
Are you sure you want to change the base?
refactor: 카테고리, 일시 선택 순서 변경 및 리팩터링 (스타카토 생성/수정) #564 #567
Changes from all commits
bdc7aa3
c30524f
1a4fadc
7bb7a5f
72d3462
85218a1
fccfece
0e88c29
7c0a30c
1c53970
f6f8592
056df1c
832f66f
26213b5
cf28140
d876f13
0c907ad
b41c9d0
1ef8ed0
3f7602f
a8445a3
8374921
267c465
605f5a6
5f82f21
b97d4ac
db070ab
bf63b30
fc5b31d
24d9b73
458a76c
67e73ee
9cd9f18
2572bba
b0097bb
36fda43
ead1270
72a4471
311e26f
1c6bc8e
09ccfcf
e4a81fc
4470102
9b79f5a
32bd428
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
MemoryCandidate
에 따라 스타카토의 날짜 범위가 달라지는 것은 맞지만, 이와 관련된 모든 로직을MemoryCandidate
의 동반 객체가 가지고 있는 점이 개인적으로 조금 어색하게 느껴졌습니다..!동반 객체가 많은 책임을 가지고 있는 것 같아서, 스타카토의 날짜 후보를 선정하는 객체를 만들어 동반 객체의 책임을 조금 분산 시켜도 좋을 것 같다는 생각이 들었어요~
스타카토의 날짜 범위를 설정하는 로직을
MemoryCandidate
의 동반 객체가 모두 가지고 있도록 구현하신 이유가 있으셨나요? 단순히 빙티의 의견이 궁금해서 여쭤봅니당! 😊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.
getAvailableMonths()
메서드 내when
문의 조건을 정리해보면 아래와 같은 규칙을 가지고 있어요!위 규칙을 활용해 조건에 따라 startMonth와 endMonth를 각각 계산한 후에
list
를 만든다면 가독성이 좀 더 좋아질 것 같아요! 빙티의 생각은 어떠신가요? 😄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.
getAvailableDays()
역시 위 코멘트와 동일한 의견입니다!getAvailableDays()
메서드도 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.
getAvailableYears()
,getDefaultYears()
,getDefaultMonths()
메서드는 표현식을 사용해도 좋을 것 같네요!ex)
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.
buildNumberPickerDates()
메서드 내부 로직을 뜯어보지 않는 이상Map<Int, Map<Int, List<Int>>>
이 의미를 추론하기 어려울 것 같아요..!typealias
를 활용해 반환값을 좀 더 명시적으로 나타내보는 건 어떨까요?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.
buildAvailableDates()
은 로직을 보고 반환값을 판단하기 어려우니 반환값을 명시해주면 좋을 것 같아요!