Repository navigation
[REFACTOR/#1715] 콕찌르기 알림 컴포즈 마이그레이션 - #1717
Hyobeen-Park wants to merge 10 commits into
Conversation
seungjunGong
left a comment
There was a problem hiding this comment.
리뷰가 늦어졌네요! 고생하셨습니다 ㅎ
최신 브랜치로 머지 이후에 한번 더 리뷰 요청 주세요!
| PokeRelationChangeOverlay( | ||
| relationChange = currentLottie, | ||
| onRelationChangeLottieEnd = { lottieState = null }, | ||
| onSoulmateRevealEnd = { } |
There was a problem hiding this comment.
p1: 여기 onSoulmatedRevealEnd 에서 lottieState = null 처리 해줘서 로띠를 띄워야 할것 같아요!
아래처럼 분기 처리를 LottieEnd 에 대해서만 해볼 수도 있을 것 같습니다.
PokeRelationChangeOverlay(
relationChange = currentLottie,
onRelationChangeLottieEnd = {
lottieState = if (currentLottie is Soulmate) SoulmateRevealed(currentLottie.user) else null
},
onSoulmateRevealEnd = { lottieState = null },
)There was a problem hiding this comment.
onSoulmatedRevealEnd 에서 lottieState = null 처리 해줘서 로띠를 띄워야 할것 같아요!
이부분 이해를 제대로 못했어요,,,😂😂 근데 when문 아예 없애는 방향으로 수정해도 될 것 같아서 적어주신 코드처럼 수정해둘게요..!!
There was a problem hiding this comment.
설명이 부족했네요! 띄워야가 아니라 닫아야 할 것 같다였습니다..하하 기존 구조에서는 천생연분 로띠 뒤에 나오는 실명 프로필이 lottieState=null 처리가 안되어있어 안 닫힐 수 있다는 거였습니다. 지금처럼 바꾸면 해결된 거 맞아요!
| } | ||
| }.onApiError { statusCode, message -> | ||
| Timber.e("statusCode: $statusCode, message: $message") | ||
| closeBottomSheet() |
There was a problem hiding this comment.
p2: closeBottomSheet()에서 messageListJob을 cancel해서, 바로 다음 줄 emit이 실행되지 않고 에러 스낵바가 안 뜰 것 같아요! emit을 먼저 하고 closeBottomSheet()를 호출하는 순서로 바꾸면 될 것 같습니다. (아래 onFailure도 동일해요)
| ) { | ||
| items( | ||
| count = notifications.itemCount, | ||
| key = { index -> notifications[index]?.user?.userId ?: index } |
There was a problem hiding this comment.
p2: 페이지 번호로 페이징하다 보니 목록 보는 중에 새 찌르기가 오면 앞 페이지 마지막 유저가 다음 페이지에 한 번 더 내려올 수 있을 가능성은 없을까요? 그러면 userId key가 겹쳐서 크래시가 날수 도 있을거 같은데 key는 빼는 게 안전할 것 같습니다!
There was a problem hiding this comment.
음.. 말씀하신 상황은 원래는 발생하면 안되는 상황이긴 한데 서버쪽에서 관련 처리가 되어있는지 잘 모르겠네요..?? 혹시 모르니까 키는 빼둘게요!
| openBottomSheet(target) | ||
| } | ||
|
|
||
| fun onMessageClick(message: PokeMessageUiState) { |
There was a problem hiding this comment.
p3: 메시지를 빠르게 두 번 누르면 바텀시트가 닫히기 전에 pokeUser가 두 번 호출될 수 있을 것 같아요! 중복 찌르기가 들어가거나 로띠, 스낵바가 두 번 노출될 수 있으니 요청 중에는 클릭을 막는 처리가 있으면 좋을 것 같습니다
There was a problem hiding this comment.
요건 throttledNoRippleClickable 사용하는 것으로 수정했습니다~!
| import androidx.compose.foundation.clickable | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.layout.size | ||
| import androidx.compose.material.Icon |
There was a problem hiding this comment.
p2: 요기 m2 적용되어있는거 같은데 m3 로 통일하면 더 좋을것 같습니다
| import androidx.paging.cachedIn | ||
| import androidx.paging.map | ||
| import dagger.hilt.android.lifecycle.HiltViewModel | ||
| import jakarta.inject.Inject |
There was a problem hiding this comment.
p3: 같은 모듈의 다른 ViewModel들은 javax.inject.Inject를 쓰고 있는데 여기만 jakarta.inject.Inject 여서 통일하면 좋을 것 같습니다~
There was a problem hiding this comment.
오 다른 viewModel들이 javax를 사용하고 있었군요..!!
이거 자바 기준!! javax -> jakarta로 이름이 수정되어서 앞으로 신기능이나 유지보수는 jakarta를 더 우선적으로 진행하고 그래서 jakarta를 사용하는걸 권장하는 것으로 알고 있습니다
안드로이드는 힐트가 javax와 jakarta를 둘 다 호환되도록 업데이트가 되어있는 상태라 둘 다 사용 가능해용
저의 경우 공식적으로 패키지 네이밍이 수정되었고 안드로이드에서도 호환 가능한 상태라 최대한 jakarta를 사용하려고 있어서 여기에서도 일부러 jakarta로 넣었는데요 혹시 승준님은 javax를 더 선호하시나요??
There was a problem hiding this comment.
오호 그런 배경은 몰랏네요😅 javax 를 유지할 근거는 없는거 같아서 jakarta 사용하면 좋겠습니다!!
| import org.sopt.official.domain.poke.entity.GetPokeNotificationListResponse | ||
| import org.sopt.official.domain.poke.entity.PokeUserResponse | ||
| import javax.inject.Inject | ||
| import org.sopt.official.domain.poke.entity.PokeUser |
There was a problem hiding this comment.
p5: 이 파일에서 PokeUser import가 쓰이지 않는 것 같아요 다른 변경 없이 import만 추가돼 있어서 제거해도 될 것 같습니다!
| * @property user 찌른 대상 친구 | ||
| */ | ||
|
|
||
| sealed interface PokeRelationChangeState { |
| title = uiState.header, | ||
| messages = uiState.pokeMessages, | ||
| isAnonymous = uiState.isAnonymous, | ||
| isAnonymousCheckboxLocked = false, |
There was a problem hiding this comment.
p2: 여기 false로 고정해두면 천생연분일 때 익명으로 메세지 보낼 수 있고 관련 스낵바도 따로 안뜰 것 같은데 target에 있는 isAnonymousCheckboxLocked 사용하는건 어떨까용?
There was a problem hiding this comment.
오 이거 예전에는 천생연분이어도 찌를 수 있었는데 명세가 바뀌었나봐요....? 말씀하신 방향대로 수정해두었습니다!
There was a problem hiding this comment.
11번째 콕부터는 실명으로만 찌르게 바뀌었어요! 천생연분 실명 프로필이 찌른 사람한테만 떠서 상대방은 모르고 넘어간다는 VOC가 있어서 앱팀에서 바꿨었습니다(#1581).
근데 지금은 체크박스 표시만 바뀌고 요청은 _uiState.value.isAnonymous=true 로 나가서 익명으로 찔릴 것 같아요..!
요청할 때 isAnonymous && !target.isAnonymousCheckboxLocked로 넘기고, toggleAnonymous()에서도 잠겨 있으면 "천생연분은 실명으로만 콕찌를 수 있어요." 스낵바 띄우고 return 해주시면 될 것 같습니다! (PokeFriendViewModel의 toggleMessageAnonymous 참고)
…tieEnd에서만 처리, lazyColumn에서 key 제거
…rate-poke-notification # Conflicts: # feature/poke-v2/src/main/java/org/sopt/official/feature/poke/v2/component/PokeRelationChangeLottie.kt # feature/poke-v2/src/main/java/org/sopt/official/feature/poke/v2/component/PokeRelationChangeOverlay.kt # feature/poke-v2/src/main/java/org/sopt/official/feature/poke/v2/component/PokeSoulmateReveal.kt # feature/poke-v2/src/main/java/org/sopt/official/feature/poke/v2/friend/model/PokeRelationChangeState.kt
Related issue 🛠
Work Description ✏️
Screenshot 📸
Uncompleted Tasks 😅
N/A
To Reviewers 📢
자체 QA 해보니까 생각보다 확인해야 할 내용이 많더라구요,,!! 콕찌르기 작업 전부 다 끝난 후에 전체적으로 QA 한 번 더 진행해보겠습니다ㅎㅎ