Skip to content

Commit

Permalink
#56 Fix : 이미 가입된 회원 바텀 시트가 안 뜨는 현상 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
DongChyeon committed Mar 4, 2024
1 parent 79f7635 commit a9370b5
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package com.teamwiney.auth.signup
import androidx.lifecycle.viewModelScope
import com.teamwiney.auth.signup.component.state.SignUpFavoriteCategoryUiState
import com.teamwiney.core.common.base.BaseViewModel
import com.teamwiney.core.common.base.CommonResponseStatus
import com.teamwiney.core.common.navigation.AuthDestinations
import com.teamwiney.core.common.util.Constants
import com.teamwiney.data.network.adapter.ApiResult
Expand Down Expand Up @@ -140,7 +141,17 @@ class SignUpViewModel @Inject constructor(
}

is ApiResult.ApiError -> {
postEffect(SignUpContract.Effect.ShowSnackBar(it.message))
if (it.code == CommonResponseStatus.USER_ALREADY_EXISTS.code) {
postEffect(
SignUpContract.Effect.ShowBottomSheet(
SignUpContract.BottomSheet.UserAlreadyExists(
it.message
)
)
)
} else {
postEffect(SignUpContract.Effect.ShowSnackBar(it.message))
}
}

else -> {
Expand Down

0 comments on commit a9370b5

Please sign in to comment.