Skip to content

Commit

Permalink
chore: 불필요한 LocalSoftwareKeyboardController 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
JuTaK97 committed Oct 26, 2024
1 parent 58e632d commit b26a307
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.focus.FocusDirection
import androidx.compose.ui.focus.FocusRequester
import androidx.compose.ui.focus.focusRequester
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.PasswordVisualTransformation
Expand All @@ -42,7 +40,6 @@ import com.wafflestudio.snutt2.lib.data.SNUTTStringUtils.isValidPassword
import com.wafflestudio.snutt2.ui.SNUTTColors
import com.wafflestudio.snutt2.ui.SNUTTTypography

@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun NewPasswordStep(
onSubmit: (String) -> Unit,
Expand All @@ -52,7 +49,6 @@ fun NewPasswordStep(
val focusManager = LocalFocusManager.current
val focusRequester = remember { FocusRequester() }
val context = LocalContext.current
val keyboardManager = LocalSoftwareKeyboardController.current

var newPasswordField by remember { mutableStateOf("") }
var newPasswordConfirmField by remember { mutableStateOf("") }
Expand Down Expand Up @@ -95,7 +91,6 @@ fun NewPasswordStep(
errorDialogTitle = context.getString(R.string.find_password_enter_password_confirm_validation_fail_alert)
showErrorDialog = true
} else {
keyboardManager?.hide()
onSubmit(newPasswordField)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.ExperimentalComposeUiApi
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalSoftwareKeyboardController
import androidx.compose.ui.res.stringResource
import androidx.hilt.navigation.compose.hiltViewModel
import androidx.lifecycle.compose.collectAsStateWithLifecycle
Expand All @@ -31,14 +28,11 @@ import com.wafflestudio.snutt2.views.logged_out.reset_password.FindPasswordViewM
import com.wafflestudio.snutt2.views.logged_out.reset_password.FindPasswordViewModel.UIState.VerifyCode
import kotlinx.coroutines.launch

@OptIn(ExperimentalComposeUiApi::class)
@Composable
fun ResetPasswordPage() {
val scope = rememberCoroutineScope()
val context = LocalContext.current
val apiOnProgress = LocalApiOnProgress.current
val apiOnError = LocalApiOnError.current
val keyboardManager = LocalSoftwareKeyboardController.current
val navController = LocalNavController.current
val viewModel = hiltViewModel<FindPasswordViewModel>()
val uiState by viewModel.uiState.collectAsStateWithLifecycle()
Expand Down Expand Up @@ -81,7 +75,6 @@ fun ResetPasswordPage() {
scope.launch {
launchSuspendApi(apiOnProgress, apiOnError) {
viewModel.checkEmailById(userId)
keyboardManager?.hide()
}
}
},
Expand All @@ -96,7 +89,6 @@ fun ResetPasswordPage() {
scope.launch {
launchSuspendApi(apiOnProgress, apiOnError) {
viewModel.sendFullEmailAndRequestCode(fullEmail)
keyboardManager?.hide()
}
}
},
Expand Down

0 comments on commit b26a307

Please sign in to comment.