From 4bf23f5f5658149db3407172030b404fc054328f Mon Sep 17 00:00:00 2001 From: flash159483 Date: Wed, 17 Jul 2024 22:46:52 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT]#30:=20Lint=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/bff/wespot/model/constants/LoginState.kt | 5 +++-- .../com/bff/wespot/auth/viewmodel/AuthViewModel.kt | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/core/model/src/main/kotlin/com/bff/wespot/model/constants/LoginState.kt b/core/model/src/main/kotlin/com/bff/wespot/model/constants/LoginState.kt index af71eec7..7ef7fc74 100644 --- a/core/model/src/main/kotlin/com/bff/wespot/model/constants/LoginState.kt +++ b/core/model/src/main/kotlin/com/bff/wespot/model/constants/LoginState.kt @@ -1,5 +1,6 @@ package com.bff.wespot.model.constants enum class LoginState { - LOGIN_SUCCESS, LOGIN_FAILURE; -} \ No newline at end of file + LOGIN_SUCCESS, + LOGIN_FAILURE, +} diff --git a/feature/auth/src/main/kotlin/com/bff/wespot/auth/viewmodel/AuthViewModel.kt b/feature/auth/src/main/kotlin/com/bff/wespot/auth/viewmodel/AuthViewModel.kt index 5e8227cd..85b0d7a3 100644 --- a/feature/auth/src/main/kotlin/com/bff/wespot/auth/viewmodel/AuthViewModel.kt +++ b/feature/auth/src/main/kotlin/com/bff/wespot/auth/viewmodel/AuthViewModel.kt @@ -38,8 +38,8 @@ class AuthViewModel @Inject constructor( ) : ViewModel(), ContainerHost { override val container = container(AuthUiState()) - private val loginState_: MutableLiveData = MutableLiveData() - val loginState: LiveData = loginState_ + private val loginStateP: MutableLiveData = MutableLiveData() + val loginState: LiveData = loginStateP private val userInput = MutableStateFlow("") @@ -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) } } }