From f2c0aebfe8e870ca2562fd2b82455b38a6b92565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=A5=98=EB=AA=85=ED=98=84?= Date: Wed, 25 Oct 2023 22:49:49 +0900 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 이석찬 / Lee Sukchan --- .../com/example/speechbuddy/compose/signup/SignupScreen.kt | 2 +- .../com/example/speechbuddy/viewmodel/SignupViewModel.kt | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/app/src/main/java/com/example/speechbuddy/compose/signup/SignupScreen.kt b/frontend/app/src/main/java/com/example/speechbuddy/compose/signup/SignupScreen.kt index 229b2a43..98516d4d 100644 --- a/frontend/app/src/main/java/com/example/speechbuddy/compose/signup/SignupScreen.kt +++ b/frontend/app/src/main/java/com/example/speechbuddy/compose/signup/SignupScreen.kt @@ -118,7 +118,7 @@ fun SignupScreen( ButtonUi( text = stringResource(id = R.string.signup), onClick = { - viewModel.signUp() + viewModel.signup(email) }, ) } diff --git a/frontend/app/src/main/java/com/example/speechbuddy/viewmodel/SignupViewModel.kt b/frontend/app/src/main/java/com/example/speechbuddy/viewmodel/SignupViewModel.kt index 533f11ff..b4d7d619 100644 --- a/frontend/app/src/main/java/com/example/speechbuddy/viewmodel/SignupViewModel.kt +++ b/frontend/app/src/main/java/com/example/speechbuddy/viewmodel/SignupViewModel.kt @@ -32,9 +32,6 @@ class SignupViewModel @Inject internal constructor( private val _uiState = MutableStateFlow(SignupUiState()) val uiState: StateFlow = _uiState.asStateFlow() - var emailInput by mutableStateOf("") - private set - var nicknameInput by mutableStateOf("") private set @@ -103,7 +100,7 @@ class SignupViewModel @Inject internal constructor( passwordCheckInput = "" } - fun signUp() { + fun signup(emailInput: String) { if (nicknameInput.isBlank() || nicknameInput.length > Constants.MAXIMUM_NICKNAME_LENGTH) { // Check nickname _uiState.update { currentState -> currentState.copy(