Open
Conversation
- `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 관련 주요 화면에 적용
sonms
approved these changes
Apr 15, 2026
Comment on lines
+169
to
+170
| pokeUser.copy(isAlreadyPoke = pokeUser.isAlreadyPoke || pokeUser.userId == userId) | ||
| } |
Member
There was a problem hiding this comment.
현재 코드는 리스트에 있는 모든 유저에 해대 copy 함수를 실행하는 방식인거 같은데
Suggested change
| pokeUser.copy(isAlreadyPoke = pokeUser.isAlreadyPoke || pokeUser.userId == userId) | |
| } | |
| if (pokeUser.userId == userId) { | |
| pokeUser.copy(isAlreadyPoke = true) | |
| } else { | |
| pokeUser | |
| } |
이런식으로 userId가 일치할 때만 새로운 객체로 copy하고 일치하지 않으면 기존 객체를 그대로 반환해서 불필요한 복사를 막아 메모리 낭비를 막는 방식은 어떨까요? (제가 이해한게 맞다면..)
Member
Author
There was a problem hiding this comment.
오 말씀해주신 방식이 불필요한 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)) |
Member
There was a problem hiding this comment.
혹시 이 코드는 어떤 의미일까요?
온보딩 기준으로 유저가 없을 경우를 대비 하신 걸까요?
Member
Author
There was a problem hiding this comment.
네 맞습니다. 기존에 콕지르기를 다한경우, 리스트에 값이 안들어와서 앱이 크래시되는 현상을 수정했습니다
- `userId`가 일치하는 사용자의 `isAlreadyPoke` 상태만 `true`로 변경하도록 조건부 로직 최적화
- 친구 목록이 비어있는 경우(`EMPTY_POKE_FRIEND`)에 대한 대응 로직 추가 - `UiState` 결과에 따라 `layout_poke_my_friend` 영역의 가시성(visible/false) 제어 추가 - `PokeMainViewModel`에서 빈 리스트 수신 시 에러 상태(`ApiError`)로 방출하도록 변경 - 친구 목록 비어있음 상태일 때는 에러 토스트를 노출하지 않도록 방어 로직 적용
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue 🛠
Work Description ✏️
toast_poke_error("문제가 발생했습니다.")로 통일image_anonymous_profile) 적용PokeNotificationScreen내 뒤로가기 동작 추가OnboardingPokeUserViewModel내 비어있는 유저 리스트 처리 로직 수정Screenshot 📸
Screen_recording_20260415_173420.mp4
Uncompleted Tasks 😅
To Reviewers 📢