Skip to content
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

feat: 채팅 목록 조회 시 최신순 정렬 적용 #594

Merged
merged 4 commits into from
Oct 17, 2024

Conversation

masonkimseoul
Copy link
Member

📌 관련 이슈

close #593

✨ 작업 내용

  • 채팅방 목록 조회 시 정렬 방식 변경
  • 브랜치 작업할 때 혼합된 불필요한 테스트 제거

📚 기타

@ChooSeoyeon ChooSeoyeon changed the title feat: CommentRoom 정렬 방식 변경 feat: 채팅 목록 조회 시 최신순 정렬 적용 Oct 17, 2024
Comment on lines +13 to +23
public int compareTo(CommentLatestResponse other) {
if (this.createdAt == null && other.createdAt == null) {
return 0;
}
if (this.createdAt == null) {
return 1;
}
if (other.createdAt == null) {
return -1;
}
return other.createdAt.compareTo(this.createdAt);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment가 없는 경우 null 처리를 하셨군요~

Comment on lines 64 to 67
assertEquals(response.offerings().get(0).offeringId(), 2L);
assertEquals(response.offerings().get(1).offeringId(), 1L);
assertEquals(response.offerings().get(2).offeringId(), 3L);
assertEquals(response.offerings().get(3).offeringId(), 4L);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assertAll 을 묶어보는건 어때요?

Copy link
Contributor

@fromitive fromitive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

도라 메이슨 코멘트 하나 남겼어요~~ 고생하셨습니다 ㅎㅎ

Copy link
Contributor

@fromitive fromitive left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ChooSeoyeon ChooSeoyeon merged commit c8d99fd into develop Oct 17, 2024
@ChooSeoyeon ChooSeoyeon deleted the feature/593-order-comment-room branch October 17, 2024 08:30
fromitive pushed a commit that referenced this pull request Nov 28, 2024
* feat: CommentRoom 정렬 방식 변경

* fix: null 일 땐 맨 아래에 배치하도록 정렬 로직 수정

* test: 잘못 들어온 contextLoads 테스트 제거

* test: 순서 보장 테스트에 containsExactly 사용

---------

Co-authored-by: Choo <choo000407@naver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

✨ 채팅 목록 조회 시 최신순 정렬 적용
3 participants