Skip to content

Commit

Permalink
[FEAT]#30: Lint 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
flash159483 committed Jul 17, 2024
1 parent 8781c1c commit 4bf23f5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.bff.wespot.model.constants

enum class LoginState {
LOGIN_SUCCESS, LOGIN_FAILURE;
}
LOGIN_SUCCESS,
LOGIN_FAILURE,
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class AuthViewModel @Inject constructor(
) : ViewModel(), ContainerHost<AuthUiState, AuthSideEffect> {
override val container = container<AuthUiState, AuthSideEffect>(AuthUiState())

private val loginState_: MutableLiveData<LoginState> = MutableLiveData()
val loginState: LiveData<LoginState> = loginState_
private val loginStateP: MutableLiveData<LoginState> = MutableLiveData()
val loginState: LiveData<LoginState> = loginStateP

private val userInput = MutableStateFlow("")

Expand Down Expand Up @@ -78,12 +78,12 @@ class AuthViewModel @Inject constructor(
}
}

private fun autoLogin() {
private fun autoLogin() {
viewModelScope.launch {
dataStoreRepository.getString(DataStoreKey.ACCESS_TOKEN)
.collect {
if(it.isNotEmpty()) {
loginState_.postValue(LoginState.LOGIN_SUCCESS)
if (it.isNotEmpty()) {
loginStateP.postValue(LoginState.LOGIN_SUCCESS)
}
}
}
Expand Down

0 comments on commit 4bf23f5

Please sign in to comment.