-
Notifications
You must be signed in to change notification settings - Fork 1
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
#45 / 미션결과 뷰 구현 #50
Conversation
3039a34
to
6745aa5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
다 고쳐지면 다시 요청해주세요잉ㅇ
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) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
새로운거 맛있게 먹고 갑니다
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) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
처음알아갑니다 맛있게 먹겠습니다22
📌 관련 이슈
closed #45
📷 screenshot
📝 Work Desciption
📚 Reference 혹은 궁금한 사항들
한번에 resource 많이 사용해야되면 resource array 참고하시면 될 것 같습니다.