Skip to content

Commit

Permalink
chore/#12: 코루틴 스코프 중첩 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
kangyein9892 committed Jan 4, 2025
1 parent 8c07f52 commit 785472b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class MyViewModel @Inject constructor(
userRepository.clearUserPreference()
}

fun handleMyIntentError(message: String) = viewModelScope.launch {
fun handleMyIntentError(message: String) {
setSideEffect(MySideEffect.SnackBarText(message))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ class SignInViewModel @Inject constructor(
setSideEffect(SignInSideEffect.NavigateToMy)
}

fun handleSignInSideEffectError(message: String) = viewModelScope.launch {
fun handleSignInSideEffectError(message: String) {
setSideEffect(SignInSideEffect.SnackBarText(message))
}

fun handleSignInSideEffectSuccess() = viewModelScope.launch {
fun handleSignInSideEffectSuccess() {
setSideEffect(SignInSideEffect.SnackBar(R.string.signin_success_text))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ class SignUpViewModel @Inject constructor(
setSideEffect(SignUpSideEffect.NavigateToSignIn)
}

fun handleSignUpIntentError(message: String) = viewModelScope.launch {
fun handleSignUpIntentError(message: String) {
setSideEffect(SignUpSideEffect.SnackBarText(message))
}

fun handleSignUpIntentSuccess() = viewModelScope.launch {
fun handleSignUpIntentSuccess() {
setSideEffect(SignUpSideEffect.SnackBar(R.string.signup_success_text))
}

Expand Down

0 comments on commit 785472b

Please sign in to comment.