Skip to content

Commit

Permalink
#11 / [CHORE] LiveData 변수명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchbreeze committed Jun 4, 2023
1 parent 93f10a2 commit 397b690
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SignUpViewModel : ViewModel() {
val isIdValid: LiveData<Boolean> = Transformations.map(idText) { checkIdValid(it) }
val isPwValid: LiveData<Boolean> = Transformations.map(pwText) { checkPwValid(it) }

val buttonValid: MutableLiveData<Boolean> = MutableLiveData(false)
val isButtonValid: MutableLiveData<Boolean> = MutableLiveData(false)

fun signUp(id: String, password: String, name: String, skill: String) {
AuthServicePool.authService.signUp(
Expand Down Expand Up @@ -66,7 +66,7 @@ class SignUpViewModel : ViewModel() {
}

fun setButtonState() {
buttonValid.value =
isButtonValid.value =
(isIdValid.value == true && isPwValid.value == true && idText.value!!.isNotBlank() && pwText.value!!.isNotBlank())
}

Expand Down
3 changes: 1 addition & 2 deletions app/src/main/res/layout/activity_sign_up.xml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@
android:layout_height="wrap_content"
android:layout_marginHorizontal="30dp"
android:layout_marginVertical="20dp"
android:enabled="@{vm.buttonValid}"
android:onClick=""
android:enabled="@{vm.isButtonValid}"
android:paddingVertical="10dp"
android:text="@string/btn_login_sign_up"
android:textSize="15sp"
Expand Down

0 comments on commit 397b690

Please sign in to comment.