Skip to content

Commit

Permalink
[#30] 로그인 기능 추가 - setTextIfNew 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ethan-223 committed Sep 9, 2022
1 parent 48a5021 commit a3d2859
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fun View.setOnDebounceClickListener(interval: Long = 1000L, action: (View?) -> U
}

fun TextView.setTextIfNew(text: CharSequence?) {
if (this.text != text) {
if (this.text.contentEquals(text).not()) {
setText(text)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.moyerun.moyeorun_android.login.ui
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.moyerun.moyeorun_android.common.EventLiveData
import com.moyerun.moyeorun_android.common.Lg
import com.moyerun.moyeorun_android.common.MutableEventLiveData
import com.moyerun.moyeorun_android.login.ProviderType
import com.moyerun.moyeorun_android.login.SignUpMetaData
Expand Down Expand Up @@ -43,6 +44,7 @@ class LoginViewModel @Inject constructor(
LoginEvent.RegisteredUser
}
}.onFailure {
Lg.fe(it)
_loginEvent.event = LoginEvent.Error
}
_isLoading.value = false
Expand Down

0 comments on commit a3d2859

Please sign in to comment.