Skip to content

[FIX/#1557] 콕지르기 QA 사항 반영#1559

Open
seungjunGong wants to merge 9 commits intodevelopfrom
fix/#1557-poke-qa
Open

[FIX/#1557] 콕지르기 QA 사항 반영#1559
seungjunGong wants to merge 9 commits intodevelopfrom
fix/#1557-poke-qa

Conversation

@seungjunGong
Copy link
Copy Markdown
Member

@seungjunGong seungjunGong commented Apr 15, 2026

Related issue 🛠

Work Description ✏️

  • Poke 관련 ApiError 발생 시 노출되는 토스트 메시지를 toast_poke_error("문제가 발생했습니다.")로 통일
  • PokeScreen 에서 콕 찌르기 후 바텀 시트 및 콕지르기 disabled 처리 미반영, 로띠 상태 초기화 반영
  • 익명 프로필 이미지 고정 리소스(image_anonymous_profile) 적용
  • PokeNotificationScreen 내 뒤로가기 동작 추가
  • OnboardingPokeUserViewModel 내 비어있는 유저 리스트 처리 로직 수정

Screenshot 📸

콕 지르기 뒤로가기 익명 프로필 추가
Screen_recording_20260415_173420.mp4

Uncompleted Tasks 😅

  • N/A

To Reviewers 📢

  • poke screen 에서 따로 콕 지르기 이후에 상태를 초기화해주는 로직이 없어 다른 화면을 갔다가 다시 돌아오는 경우 LaunchedEffect 가 처리되는 문제가 있었어서 이부분도 수정했습니다.

- `getOnboardingPokeUserListUseCase` 호출 결과가 비어있을 경우를 대비하여 `firstOrNull` 및 기본값 처리 로직 추가
- 유저 리스트가 없을 때 발생할 수 있는 인덱스 참조 오류 방지 및 빈 상태의 `UiState.Success` 반환하도록 개선
- `PokeNotificationScreen`에 `navigateUp` 콜백 파라미터 추가 및 네비게이션 그래프 연결
- 앱바 툴바에 `setOnSingleClickListener`를 통한 뒤로가기 로직 적용
- `PokeNotificationScreen` 내 불필요한 공백 및 코드 포맷팅 수정
- 익명 사용자의 프로필 이미지를 서버 전달 값 대신 로컬 리소스(`image_anonymous_profile`)를 사용하도록 변경
- `PokeUserViewHolder`, `PokeNotificationAdapter`, `PokeScreen` 등에서 익명 여부에 따른 이름 표시 및 정보 텍스트 가시성 로직 수정
- 익명 유저의 경우 유저 정보(기수, 파트)를 숨기도록 처리함에 따라 UI 일관성 확보
- `PokeMainViewModel`: `pokeSimilarFriendUiState` 업데이트 시 기존 데이터를 직접 수정하던 방식의 문제점, ui 업데이트가 반영되지 않아 새로운 객체 생성 방식으로 수정
- `PokeScreen`: 콕 찌르기 API 응답 결과(성공, 에러, 실패)에 따라 메시지 바텀시트가 닫히도록 로직 추가
- `PokeScreen`: 메시지 바텀시트 호출 시 고정된 태그(`MessageListBottomSheet`)를 사용하도록 변경하여 관리 효율화
- `PokeScreen`: `UiState` 분기 처리 코드의 가독성 개선을 위한 줄바꿈 및 포맷팅 정리
- `PokeMainViewModel` 내 UI 상태 초기화를 위한 `resetPokeUserUiState` 추가
- `PokeScreen`에서 중복된 BottomSheet 해제 로직을 통합하고, 처리 완료 후 UI 상태를 초기화하도록 변경
- `UiState.ApiError` 발생 시 `poke_user_alert_exceeded` 대신 `toast_poke_error` 메시지를 사용하도록 수정
- `FriendListSummaryActivity`, `PokeNotificationScreen`, `PokeMainActivity` 등 Poke 관련 주요 화면에 적용
@seungjunGong seungjunGong requested a review from a team as a code owner April 15, 2026 08:33
@seungjunGong seungjunGong added this to the 38th Android milestone Apr 15, 2026
Copy link
Copy Markdown
Member

@sonms sonms left a comment

Choose a reason for hiding this comment

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

빠른 수정 감사합니다 ㅎㅎ 역시 대 승 준

Comment on lines +169 to +170
pokeUser.copy(isAlreadyPoke = pokeUser.isAlreadyPoke || pokeUser.userId == userId)
}
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.

현재 코드는 리스트에 있는 모든 유저에 해대 copy 함수를 실행하는 방식인거 같은데

Suggested change
pokeUser.copy(isAlreadyPoke = pokeUser.isAlreadyPoke || pokeUser.userId == userId)
}
if (pokeUser.userId == userId) {
pokeUser.copy(isAlreadyPoke = true)
} else {
pokeUser
}

이런식으로 userId가 일치할 때만 새로운 객체로 copy하고 일치하지 않으면 기존 객체를 그대로 반환해서 불필요한 복사를 막아 메모리 낭비를 막는 방식은 어떨까요? (제가 이해한게 맞다면..)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

오 말씀해주신 방식이 불필요한 copy 를 줄여서 더 나을것 같습니다 ! 수정해둘게요 :)

Comment on lines +60 to +66
val nextRandomUsers = response.randomInfoList.firstOrNull()
?: PokeRandomUserList.PokeRandomUsers(
randomType = randomType.value,
randomTitle = "",
userInfoList = emptyList(),
)
_onboardingPokeUserListUiState.emit(UiState.Success(nextRandomUsers))
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.

혹시 이 코드는 어떤 의미일까요?
온보딩 기준으로 유저가 없을 경우를 대비 하신 걸까요?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

네 맞습니다. 기존에 콕지르기를 다한경우, 리스트에 값이 안들어와서 앱이 크래시되는 현상을 수정했습니다

- `userId`가 일치하는 사용자의 `isAlreadyPoke` 상태만 `true`로 변경하도록 조건부 로직 최적화
- 친구 목록이 비어있는 경우(`EMPTY_POKE_FRIEND`)에 대한 대응 로직 추가
- `UiState` 결과에 따라 `layout_poke_my_friend` 영역의 가시성(visible/false) 제어 추가
- `PokeMainViewModel`에서 빈 리스트 수신 시 에러 상태(`ApiError`)로 방출하도록 변경
- 친구 목록 비어있음 상태일 때는 에러 토스트를 노출하지 않도록 방어 로직 적용
Copy link
Copy Markdown
Member

@1971123-seongmin 1971123-seongmin 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
Copy Markdown
Member

@vvan2 vvan2 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다잉!!

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.

[FIX] 콕지르기 QA 사항 반영

4 participants