-
Notifications
You must be signed in to change notification settings - Fork 0
fix: 로그인 관련 API 에러 처리 방식 개선 #196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
ef67f21
c8ab388
125fc7a
b604d9c
24954eb
1914ff2
b68ed25
61910e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| package com.ninecraft.booket.core.common.constants | ||
|
|
||
| enum class ErrorScope { | ||
| GLOBAL, LOGIN, BOOK_REGISTER, RECORD_REGISTER | ||
| GLOBAL, LOGIN, AUTH_SESSION_EXPIRED, | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ data class LoginUiState( | |
|
|
||
| @Immutable | ||
| sealed interface LoginSideEffect { | ||
| data object KakaoLogin : LoginSideEffect | ||
| data class KakaoLogin(private val key: String = UUID.randomUUID().toString()) : LoginSideEffect | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @easyhooon 로그인 API 에러 처리 방식을 개선하면서 LoginSideEffect를 초기화해주는 로직이 필요해졌습니다. (안그러면 카카오 로그인 재시도 시 무한로딩 발생) 토스트메세지 이벤트처럼 UUID 값을 사용하는 방식으로 변경했는데 확인 부탁드립니다
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 무한로딩 발생하는게 이거 때문이었군여
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fun handleEvent(event: LoginUiEvent) {
when (event) {
is LoginUiEvent.OnKakaoLoginButtonClick -> {
isLoading = true
sideEffect = LoginSideEffect.KakaoLogin()
}
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. uuid 방식으로 해결할 수 있는 케이스라 괜찮은거같습니다! |
||
| data class ShowToast( | ||
| val message: String, | ||
| private val key: String = UUID.randomUUID().toString(), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굳이 변수로 안빼도될거같네여
빼려면 다 빼고 안빼려면 다 안빼고 하드코딩하는게 통일성 측면에서 좋을거같슴다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반영 완료 61910e2