Skip to content

Commit

Permalink
[Feat/#63] 홈-문답 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
ss99x2002 committed Jul 16, 2023
1 parent 0408bf3 commit 67ac37f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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?
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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?
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class QuestionAnswerActivity :
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding.clickListener = this
binding.vm = viewModel
observeQnaResponse()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class QuestionAnswerViewModel(private val questionAnswerRepositoryImpl: Question
private var _qnaResponse = MutableLiveData<QuestionAnswerResponseDto.QnaData>()
val qnaResponse: LiveData<QuestionAnswerResponseDto.QnaData> = _qnaResponse

var isMyAnswer = MutableLiveData(false)
var isOpponentAnswer = MutableLiveData(false)
var isMyAnswer = MutableLiveData<Boolean?>()
var isOpponentAnswer = MutableLiveData<Boolean?>()

var appbarSection = MutableLiveData<String>()
private fun getQuestionAnswer() {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/activity_question_answer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 67ac37f

Please sign in to comment.