From a955f681492249d8460e407b725127bcbb7986d9 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Sun, 3 Mar 2024 12:58:39 +0900 Subject: [PATCH] =?UTF-8?q?[REFACTOR]=20#141=20:=20wapMemberCode=20->=20Me?= =?UTF-8?q?mberCode=20=ED=94=84=EB=A1=9C=ED=8D=BC=ED=8B=B0=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt | 2 +- .../com/wap/wapp/feature/auth/signup/SignUpViewModel.kt | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt index a8c98de6..942a7295 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpScreen.kt @@ -106,7 +106,7 @@ internal fun SignUpScreen( ) { if (showCodeValidationDialog) { CodeValidationDialog( - code = viewModel.wapMemberCode.collectAsStateWithLifecycle().value, + code = viewModel.memberCode.collectAsStateWithLifecycle().value, setValidationCode = viewModel::setWapMemberCode, onConfirmRequest = viewModel::validateMemberCode, onDismissRequest = { showCodeValidationDialog = false }, diff --git a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt index c38ca1ae..6a85625c 100644 --- a/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt +++ b/feature/auth/src/main/java/com/wap/wapp/feature/auth/signup/SignUpViewModel.kt @@ -36,8 +36,8 @@ class SignUpViewModel @Inject constructor( private val _signUpSemester: MutableStateFlow = MutableStateFlow(FIRST_SEMESTER) val signUpSemester: StateFlow = _signUpSemester.asStateFlow() - private val _wapMemberCode: MutableStateFlow = MutableStateFlow("") - val wapMemberCode: StateFlow = _wapMemberCode.asStateFlow() + private val _memberCode: MutableStateFlow = MutableStateFlow("") + val memberCode: StateFlow = _memberCode.asStateFlow() private val _isError: MutableStateFlow = MutableStateFlow(false) val isError: StateFlow get() = _isError @@ -58,7 +58,7 @@ class SignUpViewModel @Inject constructor( } fun validateMemberCode() = viewModelScope.launch { - validateWapMemberCodeUseCase(_wapMemberCode.value).onSuccess { + validateWapMemberCodeUseCase(_memberCode.value).onSuccess { when (it) { CodeValidation.VALID -> _signUpEventFlow.emit(SignUpEvent.ValidateMemberCodeSuccess) @@ -95,7 +95,7 @@ class SignUpViewModel @Inject constructor( fun setSemester(semester: String) { _signUpSemester.value = semester } - fun setWapMemberCode(code: String) { _wapMemberCode.value = code } + fun setWapMemberCode(code: String) { _memberCode.value = code } sealed class SignUpEvent { data object ValidateUserInformationSuccess : SignUpEvent()