-
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
Fix [#82] 1.1.0버전 최종 QA 반영 #84
base: develop
Are you sure you want to change the base?
Conversation
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.
고생하셨습니다.
코멘트 확인 부탁드릴게요~
추가로 #81 에 대해서도 코멘트 남겨두었습니다!
extension Array { | ||
subscript(safe index: Int) -> Element? { | ||
return indices.contains(index) ? self[index] : nil | ||
} | ||
} |
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.
오, 이렇게 익스텐션으로 구현하신 이유가 궁금하네요.
let currentComponents = currentVersion.split(separator: ".").map { Int($0) ?? 0 } | ||
let marketingComponents = marketingVersion.split(separator: ".").map { Int($0) ?? 0 } | ||
|
||
let currentMajor = currentComponents[safe: 0] ?? 0 | ||
let currentMinor = currentComponents[safe: 1] ?? 0 | ||
let currentPatch = currentComponents[safe: 2] ?? 0 | ||
|
||
let marketingMajor = marketingComponents[safe: 0] ?? 0 | ||
let marketingMinor = marketingComponents[safe: 1] ?? 0 | ||
let marketingPatch = marketingComponents[safe: 2] ?? 0 |
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.
nil
값을 대체하기 위해 많은 부분에서 기본값으로 0
이 선언되어 있는데요.
이렇게 되면, nil
일 때의 추적이 어렵고 기본값에 대한 의도치 않는 문제가 발생할 수 있다는 단점이 있을 것 같습니다.
이를 옵셔널 바인딩으로 처리하는 것은 어떨까요?
for (current, appStore) in zip(currentComponents, appStoreComponents) { | ||
if current < appStore { | ||
return true | ||
} else if current > appStore { | ||
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.
오 zip
을 사용하셨군요! 👍
반복문 안에서 두 값이 같을 때의 처리는 없는데, 상관없는 부분일까요?
|
||
if replyData.count % 15 == 0 && viewModel.cursor != lastCommentID && (scrollView.contentOffset.y + scrollView.frame.size.height) >= (scrollView.contentSize.height) { | ||
if unFlattenDatas.count % 10 == 0 && viewModel.cursor != lastCommentID && (scrollView.contentOffset.y + scrollView.frame.size.height) >= (scrollView.contentSize.height) { |
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.
조건문이 많아서 개행하는 것이 좋아보여요.
👻 PULL REQUEST
🛠️ PR POINT
💡 참고사항
📸 스크린샷
📟 관련 이슈