-
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/#283] 아티클 개수가 10의 배수일 경우 마지막 스크롤에서 isLast=false로 응답되는 문제 해결 #284
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.
아티클 스크롤시 응답 필드 중 isLast
필드에 대한 오류 수정 작업입니다.
확인 부탁드립니다!
).limit(10) | ||
).limit(11) |
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.
조회수 상위 10개 아티클 ID를 조회할 때 10개가 아닌 11개로 일단 조회
val isLast = if (articleViewsRecords.size == 11) { | ||
articleViewsRecords.removeAt(10) | ||
false | ||
} else { | ||
true | ||
} |
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.
11개를 조회한 뒤, 그 개수가 11개일 경우에만 해당 스크롤의 isLast
필드를 false
로 응답. 그렇지 않으면 true
enum class CategoryType(val code: Byte, val displayName: String) { | ||
All(-1, "전체"), // Should not be stored in the DB |
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.
해당 PR과는 무관하지만 아티클 전체 카테고리 추가되었습니다
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.
확인했습니다!
return ReadArticlesUseCaseOut(articleUseCaseOuts, sortedArticles.size != 10) | ||
return ReadArticlesUseCaseOut(articleUseCaseOuts, isLast) |
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.
🎫 연관 이슈
resolved #283
💁♂️ PR 내용
🙏 작업
🙈 PR 참고 사항
📸 스크린샷
🤖 테스트 체크리스트