Skip to content

[REFACTOR/#1715] 콕찌르기 알림 컴포즈 마이그레이션 - #1717

Open
Hyobeen-Park wants to merge 10 commits into
developfrom
refactor/#1715-migrate-poke-notification
Open

Hyobeen-Park wants to merge 10 commits into
developfrom
refactor/#1715-migrate-poke-notification

Conversation

@Hyobeen-Park

@Hyobeen-Park Hyobeen-Park commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Related issue 🛠

Work Description ✏️

  • 콕찌르기 중 알림 뷰 컴포즈로 마이그레이션 및 mds 적용했습니다
  • 콕찌르기 알림 목록 조회에 Paging3 도입했습니다
  • 로띠 레이아웃이 내 친구 뷰에서 사용하는 것과 동일해서 패키지 이동 후 사용했습니다

Screenshot 📸

알림 목록
image

Uncompleted Tasks 😅

N/A

To Reviewers 📢

자체 QA 해보니까 생각보다 확인해야 할 내용이 많더라구요,,!! 콕찌르기 작업 전부 다 끝난 후에 전체적으로 QA 한 번 더 진행해보겠습니다ㅎㅎ

@Hyobeen-Park Hyobeen-Park added this to the 39th Android milestone Oct 15, 2026
@Hyobeen-Park Hyobeen-Park self-assigned this Oct 15, 2026
@Hyobeen-Park
Hyobeen-Park requested a review from a team as a code owner October 15, 2026 16:49

@seungjunGong seungjunGong left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

리뷰가 늦어졌네요! 고생하셨습니다 ㅎ
최신 브랜치로 머지 이후에 한번 더 리뷰 요청 주세요!

PokeRelationChangeOverlay(
relationChange = currentLottie,
onRelationChangeLottieEnd = { lottieState = null },
onSoulmateRevealEnd = { }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p1: 여기 onSoulmatedRevealEnd 에서 lottieState = null 처리 해줘서 로띠를 띄워야 할것 같아요!
아래처럼 분기 처리를 LottieEnd 에 대해서만 해볼 수도 있을 것 같습니다.

PokeRelationChangeOverlay(
    relationChange = currentLottie,
    onRelationChangeLottieEnd = {
        lottieState = if (currentLottie is Soulmate) SoulmateRevealed(currentLottie.user) else null
    },
    onSoulmateRevealEnd = { lottieState = null },
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

onSoulmatedRevealEnd 에서 lottieState = null 처리 해줘서 로띠를 띄워야 할것 같아요!

이부분 이해를 제대로 못했어요,,,😂😂 근데 when문 아예 없애는 방향으로 수정해도 될 것 같아서 적어주신 코드처럼 수정해둘게요..!!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

설명이 부족했네요! 띄워야가 아니라 닫아야 할 것 같다였습니다..하하 기존 구조에서는 천생연분 로띠 뒤에 나오는 실명 프로필이 lottieState=null 처리가 안되어있어 안 닫힐 수 있다는 거였습니다. 지금처럼 바꾸면 해결된 거 맞아요!

}
}.onApiError { statusCode, message ->
Timber.e("statusCode: $statusCode, message: $message")
closeBottomSheet()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p2: closeBottomSheet()에서 messageListJob을 cancel해서, 바로 다음 줄 emit이 실행되지 않고 에러 스낵바가 안 뜰 것 같아요! emit을 먼저 하고 closeBottomSheet()를 호출하는 순서로 바꾸면 될 것 같습니다. (아래 onFailure도 동일해요)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

넵넵!! 수정했습니다

) {
items(
count = notifications.itemCount,
key = { index -> notifications[index]?.user?.userId ?: index }

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p2: 페이지 번호로 페이징하다 보니 목록 보는 중에 새 찌르기가 오면 앞 페이지 마지막 유저가 다음 페이지에 한 번 더 내려올 수 있을 가능성은 없을까요? 그러면 userId key가 겹쳐서 크래시가 날수 도 있을거 같은데 key는 빼는 게 안전할 것 같습니다!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

음.. 말씀하신 상황은 원래는 발생하면 안되는 상황이긴 한데 서버쪽에서 관련 처리가 되어있는지 잘 모르겠네요..?? 혹시 모르니까 키는 빼둘게요!

openBottomSheet(target)
}

fun onMessageClick(message: PokeMessageUiState) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p3: 메시지를 빠르게 두 번 누르면 바텀시트가 닫히기 전에 pokeUser가 두 번 호출될 수 있을 것 같아요! 중복 찌르기가 들어가거나 로띠, 스낵바가 두 번 노출될 수 있으니 요청 중에는 클릭을 막는 처리가 있으면 좋을 것 같습니다

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

요건 throttledNoRippleClickable 사용하는 것으로 수정했습니다~!

import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.Icon

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p2: 요기 m2 적용되어있는거 같은데 m3 로 통일하면 더 좋을것 같습니다

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

m3로 수정했습니닷!

import androidx.paging.cachedIn
import androidx.paging.map
import dagger.hilt.android.lifecycle.HiltViewModel
import jakarta.inject.Inject

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p3: 같은 모듈의 다른 ViewModel들은 javax.inject.Inject를 쓰고 있는데 여기만 jakarta.inject.Inject 여서 통일하면 좋을 것 같습니다~

@Hyobeen-Park Hyobeen-Park Nov 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

오 다른 viewModel들이 javax를 사용하고 있었군요..!!

이거 자바 기준!! javax -> jakarta로 이름이 수정되어서 앞으로 신기능이나 유지보수는 jakarta를 더 우선적으로 진행하고 그래서 jakarta를 사용하는걸 권장하는 것으로 알고 있습니다
안드로이드는 힐트가 javax와 jakarta를 둘 다 호환되도록 업데이트가 되어있는 상태라 둘 다 사용 가능해용

저의 경우 공식적으로 패키지 네이밍이 수정되었고 안드로이드에서도 호환 가능한 상태라 최대한 jakarta를 사용하려고 있어서 여기에서도 일부러 jakarta로 넣었는데요 혹시 승준님은 javax를 더 선호하시나요??

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

오호 그런 배경은 몰랏네요😅 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p5: 이 파일에서 PokeUser import가 쓰이지 않는 것 같아요 다른 변경 없이 import만 추가돼 있어서 제거해도 될 것 같습니다!

* @property user 찌른 대상 친구
*/

sealed interface PokeRelationChangeState {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

p3: 공통 상태로 분리해두니까 좋네요 ㅎㅎ

@vahkjsdf vahkjsdf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

수고 많으셨습니당!

title = uiState.header,
messages = uiState.pokeMessages,
isAnonymous = uiState.isAnonymous,
isAnonymousCheckboxLocked = false,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

p2: 여기 false로 고정해두면 천생연분일 때 익명으로 메세지 보낼 수 있고 관련 스낵바도 따로 안뜰 것 같은데 target에 있는 isAnonymousCheckboxLocked 사용하는건 어떨까용?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

오 이거 예전에는 천생연분이어도 찌를 수 있었는데 명세가 바뀌었나봐요....? 말씀하신 방향대로 수정해두었습니다!

@seungjunGong seungjunGong Nov 16, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

11번째 콕부터는 실명으로만 찌르게 바뀌었어요! 천생연분 실명 프로필이 찌른 사람한테만 떠서 상대방은 모르고 넘어간다는 VOC가 있어서 앱팀에서 바꿨었습니다(#1581).

근데 지금은 체크박스 표시만 바뀌고 요청은 _uiState.value.isAnonymous=true 로 나가서 익명으로 찔릴 것 같아요..!

요청할 때 isAnonymous && !target.isAnonymousCheckboxLocked로 넘기고, toggleAnonymous()에서도 잠겨 있으면 "천생연분은 실명으로만 콕찌를 수 있어요." 스낵바 띄우고 return 해주시면 될 것 같습니다! (PokeFriendViewModel의 toggleMessageAnonymous 참고)

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 콕찌르기 알림 뷰 마이그레이션

3 participants