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

[Feat/#47] 답변 화면, 문답 화면 ViewModel 설계 #50

Merged
merged 9 commits into from
Jul 13, 2023

Conversation

ss99x2002
Copy link
Member

🎀 Related Issues

close #47

🤔 What Did You Do

  • 답변 화면 ViewModel 구현
  • 문답 화면 ViewModel 구현
  • 답변 저장 Dialog ViewModel 구현
  • 문답->답변->저장 dialog 데이터 전달 구현

⁉️ etc

  • 임시 api 명세서 바탕으로 responseDto 만들어서 viewModel을 작성해봤습니다.

  • 문답 화면에서는 사용자 status에 따른 blur 처리 부분 로직을 중점적으로 봐주시면 좋을거같습니다.

  • 전체적으로는 문답 화면으로부터 section과 topic, question 데이터가 답변 화면, dialog까지 계속 넘어가야하는데 이 부분 로직도 봐주시면 좋겠습니다.

@ss99x2002 ss99x2002 changed the title [Feat/#47] 답변화면, 문답화면 ViewModel 구현 [Feat/#47] 답변화면, 문답화면 ViewModel 설계 Jul 11, 2023
@ss99x2002 ss99x2002 changed the title [Feat/#47] 답변화면, 문답화면 ViewModel 설계 [Feat/#47] 답변 화면, 문답 화면 ViewModel 설계 Jul 11, 2023
@ss99x2002 ss99x2002 requested a review from yeoncheong July 11, 2023 15:49
@ss99x2002 ss99x2002 self-assigned this Jul 11, 2023
@ss99x2002 ss99x2002 added feature 기능 개발 서현 labels Jul 11, 2023
Copy link
Contributor

@yeoncheong yeoncheong left a comment

Choose a reason for hiding this comment

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

Fragment / Activity -> Fragment 데이터 전달은 Bundle을 이용하는 것이 맞습니다!! 잘 하셨습니다 👍리스너를 사용하는 방법도 있으니 한 번 찾아보셔도 좋을 것 같습니다.

if (data.isMyAnswer) {
tvAnswerMe.text = data.myAnswer
tvAnswerOther.text = "상대방은 아직 답변하지 않았어요"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

분기처리 깔끔합니다!


class ConfirmAnswerDialogFragmentViewModel : ViewModel() {
fun postAnswer(answer: String) {
//TODO(post Repo로 가는 함수 가보자고.)
Copy link
Contributor

Choose a reason for hiding this comment

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

가보자고.

@ss99x2002 ss99x2002 merged commit 05c15a8 into develop Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 기능 개발 서현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 답변 화면, 문답 화면 ViewModel 설계
2 participants