diff --git a/app/src/main/java/com/sopt/umbba_android/data/model/response/HomeCaseResponseDto.kt b/app/src/main/java/com/sopt/umbba_android/data/model/response/HomeCaseResponseDto.kt index 920ab1f2..588ece5b 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/model/response/HomeCaseResponseDto.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/model/response/HomeCaseResponseDto.kt @@ -20,9 +20,9 @@ data class HomeCaseResponseDto( val inviteCode: String?, @SerialName("invite_username") val inviteUserName: String?, - @SerialName("invite_url") - val inviteUrl: String?, - @SerialName("relative_user_activate") - val relativeUserActivate: Boolean? + @SerialName("install_url") + val installUrl: String?, + @SerialName("relative_user_active") + val relativeUserActive: Boolean? ) } diff --git a/app/src/main/java/com/sopt/umbba_android/data/model/response/QuestionAnswerResponseDto.kt b/app/src/main/java/com/sopt/umbba_android/data/model/response/QuestionAnswerResponseDto.kt index 16af33a2..290589ef 100644 --- a/app/src/main/java/com/sopt/umbba_android/data/model/response/QuestionAnswerResponseDto.kt +++ b/app/src/main/java/com/sopt/umbba_android/data/model/response/QuestionAnswerResponseDto.kt @@ -14,8 +14,6 @@ data class QuestionAnswerResponseDto( ) { @Serializable data class QnaData( - @SerialName("response_case") - val responseCase: Int, @SerialName("qna_id") val qnaId: Long?, @SerialName("section") @@ -37,14 +35,6 @@ data class QuestionAnswerResponseDto( @SerialName("opponent_username") val opponentUsername: String?, @SerialName("my_username") - val myUsername: String?, - @SerialName("invite_code") - val inviteCode:String?, - @SerialName("invite_username") - val inviteUserName:String?, - @SerialName("install_url") - val installUrl:String?, - @SerialName("relative_user_active") - val relativeUserActivate:Boolean? + val myUsername: String? ) } \ No newline at end of file diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt index 0a1201f9..d5382ae4 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/QuestionAnswerActivity.kt @@ -20,6 +20,7 @@ class QuestionAnswerActivity : override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) binding.clickListener = this + binding.vm = viewModel observeQnaResponse() } diff --git a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt index 8b1ea44f..06f44622 100644 --- a/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt +++ b/app/src/main/java/com/sopt/umbba_android/presentation/qna/viewmodel/QuestionAnswerViewModel.kt @@ -19,8 +19,8 @@ class QuestionAnswerViewModel(private val questionAnswerRepositoryImpl: Question private var _qnaResponse = MutableLiveData() val qnaResponse: LiveData = _qnaResponse - var isMyAnswer = MutableLiveData(false) - var isOpponentAnswer = MutableLiveData(false) + var isMyAnswer = MutableLiveData() + var isOpponentAnswer = MutableLiveData() var appbarSection = MutableLiveData() private fun getQuestionAnswer() { diff --git a/app/src/main/res/layout/activity_question_answer.xml b/app/src/main/res/layout/activity_question_answer.xml index 7cadc23a..0c562602 100644 --- a/app/src/main/res/layout/activity_question_answer.xml +++ b/app/src/main/res/layout/activity_question_answer.xml @@ -75,7 +75,7 @@ android:layout_marginTop="16dp" android:layout_marginBottom="8dp" android:textAppearance="@style/AndroidBody1_2Regular16" - android:textColor="@{vm.isOpponentAnswer() ? @color/umbba_black : @color/grey_800 }" + android:textColor="@{vm.isOpponentAnswer ? @color/umbba_black : @color/grey_800 }" app:layout_constraintBottom_toTopOf="@id/tv_from_other" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -123,7 +123,7 @@ android:layout_marginTop="16dp" android:layout_marginBottom="8dp" android:textAppearance="@style/AndroidBody1_2Regular16" - android:textColor="@{vm.isMyAnswer() ? @color/umbba_black : @color/grey_800 }" + android:textColor="@{vm.isMyAnswer ? @color/umbba_black : @color/grey_800 }" app:layout_constraintBottom_toTopOf="@id/tv_from_me" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent"