Skip to content

Commit

Permalink
[FIX/#5] 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeeyubin committed Jul 6, 2024
1 parent 4bcb604 commit 1110416
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ class SignInViewModel @Inject constructor() : ViewModel() {

private fun signInFailure(context: Context, error: Throwable?) {
if (error.toString().contains(KAKAO_NOT_LOGGED_IN)) {
UserApiClient.instance.loginWithKakaoAccount(context) { token, _ ->
if (error != null) {
sigInCancellationOrError(error)
} else if (token != null) {
signInSuccess(token)
}
UserApiClient.instance.loginWithKakaoAccount(context) { token, error ->
signInResult(context, token, error)
}
} else {
sigInCancellationOrError(error)
Expand Down Expand Up @@ -87,4 +83,4 @@ class SignInViewModel @Inject constructor() : ViewModel() {
companion object {
private const val KAKAO_NOT_LOGGED_IN = "statusCode=302"
}
}
}

0 comments on commit 1110416

Please sign in to comment.