Skip to content
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

#45 / 미션결과 뷰 구현 #50

Merged
merged 11 commits into from
Jul 17, 2023
Merged

#45 / 미션결과 뷰 구현 #50

merged 11 commits into from
Jul 17, 2023

Conversation

rkdmf1026
Copy link
Contributor

@rkdmf1026 rkdmf1026 commented Jul 17, 2023

📌 관련 이슈

closed #45

📷 screenshot

스크린샷(5)

📝 Work Desciption

  • 미션결과 Dto 생성
  • 미션결 뷰 작업하기
  • MissionResultActivity 뷰모델 연결 및 state 별 분기처리

📚 Reference 혹은 궁금한 사항들

한번에 resource 많이 사용해야되면 resource array 참고하시면 될 것 같습니다.

@rkdmf1026 rkdmf1026 added feat 구현 및 개선 UI UI 작업 동기 🐐 유니의 정신적 지주 담당 labels Jul 17, 2023
@rkdmf1026 rkdmf1026 added this to the Phase2 milestone Jul 17, 2023
@rkdmf1026 rkdmf1026 requested a review from a team July 17, 2023 13:09
@rkdmf1026 rkdmf1026 self-assigned this Jul 17, 2023
Copy link
Contributor

@taeheeL taeheeL 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 +42 to +46
val imageArray = this.resources.obtainTypedArray(R.array.result_state_image)
val stringArray = this.resources.obtainTypedArray(R.array.result_state_text)
binding.ivMissionResult.setImageResource(imageArray.getResourceId(state.order, 0))
binding.tvMyMissionResult.text = stringArray.getString(state.order)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

새로운거 맛있게 먹고 갑니다

Comment on lines +12 to +20
class MissionResultViewModel(savedStateHandle: SavedStateHandle) : ViewModel() {
// TODO: response 네이밍 바꾸고 Result로 감싸서 성공 실패 분기 처리하기
val roundGameId: Int = savedStateHandle.get<Int>(MissionRecordActivity.ROUND_GAME_ID) ?: -1
private val _missionResult = MutableLiveData<ResponseShortGameResult>()
val missionResult: LiveData<ResponseShortGameResult> = _missionResult
val myMissionResult = missionResult.map { it.myRoundMission }
val partnerMissionResult = missionResult.map { it.partnerRoundMission }
val myMissionResultState =
myMissionResult.map { MissionResultState.getMissionResultType(it.finalResult) }
Copy link
Contributor

Choose a reason for hiding this comment

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

처음알아갑니다 맛있게 먹겠습니다22

@rkdmf1026 rkdmf1026 merged commit 622e30c into develop Jul 17, 2023
1 check passed
@rkdmf1026 rkdmf1026 deleted the #45-mission-result-ui branch July 17, 2023 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 구현 및 개선 동기 🐐 유니의 정신적 지주 담당 UI UI 작업
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[한판승부] 승부결과 뷰 작업
2 participants