-
Notifications
You must be signed in to change notification settings - Fork 1
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/week compose 07 #13
base: develop-compose
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μκ³ νμ΄μ!!
private val authRepository: AuthRepository, | ||
) : ViewModel() { | ||
|
||
val loginResult: MutableLiveData<Boolean> = MutableLiveData() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
val loginResult: MutableLiveData<Boolean> = MutableLiveData() | |
private val _loginResult = MutableLiveData<Boolean>() | |
val loginResult: LiveData<Boolean> get() = _loginResult |
μ΄λ κ² μμ±ν΄μ _loginResultλ ViewModelμμλ§ μμ κ°λ₯νκ² νκ³ activityμμλ loginResultμ μ κ·Όλ§ κ°λ₯ν μ μκ² νλ©΄ μ’μ κ² κ°μμ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errorMessageλ λ§μ°¬κ°μ§ μμ!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
μ¬κΈ°λ 6μ£Όμ°¨ λ¨Έμ§ λλ©΄ λ€μ λ΄λ³Όκ²μ©
ννκΈ°λμ λ무 κ³ μνμ΄μ
μ§μ§ μΌ.μ·¨.μ.μ₯!!!
κ³ λ§μγ γ
private val authRepository: AuthRepository, | ||
) : ViewModel() { | ||
|
||
val loginResult: MutableLiveData<Boolean> = MutableLiveData() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errorMessageλ λ§μ°¬κ°μ§ μμ!!
class LoginViewModelFactory : ViewModelProvider.Factory { | ||
override fun <T : ViewModel> create(modelClass: Class<T>): T { | ||
if (modelClass.isAssignableFrom(LoginViewModel::class.java)) { | ||
val repository = | ||
AuthRepoImpl(ServicePool.authService) | ||
return LoginViewModel(repository) as T | ||
} else { | ||
throw IllegalArgumentException("Failed to create ViewModel: ${modelClass.name}") | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
factory λ·°λͺ¨λΈ λ§λ€ λ§λ€νμ μμ΄ νλλ‘ ν©μ³μ£ΌμΈμ!
νμ₯μ±κ³Ό μ€μ μ§μ€νκ³Ό λκΈ° λλ¬Έμ λ ν¨μ¨μ μ
λλ€
μν λλλ©΄ μμΈνκ² μλ €λ릴κ²μ©
var signUpId = mutableStateOf("") | ||
var signUpPw = mutableStateOf("") | ||
var signUpName = mutableStateOf("") | ||
var signUpPhone = mutableStateOf("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var signUpId = mutableStateOf("") | |
var signUpPw = mutableStateOf("") | |
var signUpName = mutableStateOf("") | |
var signUpPhone = mutableStateOf("") | |
var id by rememberSaveable { mutableStateOf("") } | |
var password by rememberSaveable { mutableStateOf("") } | |
var nickName by rememberSaveable { mutableStateOf("") } | |
var mbti by rememberSaveable { mutableStateOf("") } |
by rememberν€μλλ₯Ό ν΅ν΄ κ°μ²΄λ₯Ό μμ±ν μλ κ°μ²΄λ₯Ό κΈ°μ΅νκ³ μ¬μ¬μ© ν μ μμ΅λλ€!
μ»΄ν¬μ¦μμμ μνκ΄λ¦¬ ν¨ν΄μ΄μμ¬
πππ΄π΄πΆπ¦π΄
πππ°π³π¬ ππ¦π΄π€π³πͺπ±π΅πͺπ°π―
π·ππ€π³π¦π¦π―π΄π©π°π΅
νλ©΄ μλμ κ·Έ μ κ³Ό λμΌν©λλ€. λͺ¨λ μ€νλ©λλ€.
π¬ππ° ππ¦π·πͺπ¦πΈπ¦π³π΄
λ΄μ£Όμ μνμ΄λΌ κΈνκ² λ―Έλ¦¬ μ¬λ €μ κ³ μΉ μ μ΄ λ§μ κ² κ°μ΅λλ€
μΈμ λ μ§ κ³ μΉ μ λ§μ΄ λ§μ΄ μκΈ°ν΄μ£Όμλ©΄ κ°μ¬νκ² μ΅λλ€..!!