-
Notifications
You must be signed in to change notification settings - Fork 3
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
[AN] feat: 채팅 폴링 구현 #764
base: develop
Are you sure you want to change the base?
[AN] feat: 채팅 폴링 구현 #764
Conversation
caaaa6e
to
a2c2f41
Compare
val recentMessage: String?, | ||
val recentMessageCreatedAt: LocalDateTime?, |
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.
채팅방 입실/퇴실일 경우 null이 들어옵니다!
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.
고생하셨습니다~~
코멘트 남긴 부분만 한 번 확인해주시면 좋을 것 같아요.
override fun onHiddenChanged(hidden: Boolean) { | ||
super.onHiddenChanged(hidden) |
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.
불필요한 업데이트를 방지하고자, MainActivity에서 show를 할 때만 폴링을 진행하는 로직입니다!
_chats.value = room.chatRooms.map { it.toUiModel() } | ||
memberId = room.myMemberId | ||
} | ||
delay(1000) |
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.
delay를 작성한 이유가 무엇일까요?
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.
폴링 주기를 생각했을 때, 1초가 너무 느리지 않은 적당한 업데이트 주기라고 판단했습니다.
좋네요~!! |
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.
딱히 리뷰 할 부분이 없네요
굿입니다
val recentMessage: String?, | ||
val recentMessageCreatedAt: LocalDateTime?, |
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.
놀이터 폴링할때 나중에 참고하러 올게요 ~! 👍
이슈
개발 사항