-
Notifications
You must be signed in to change notification settings - Fork 2
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
[Feature] LoginScreen UI 로직 구현 #22
Conversation
...main/kotlin/ac/dnd/bookkeeping/android/presentation/ui/main/login/main/LoginMainViewModel.kt
Outdated
Show resolved
Hide resolved
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.
화이팅~
import kotlinx.parcelize.Parcelize | ||
|
||
@Parcelize | ||
data class KakaoUserInformationModel( |
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.
default value 여기 적으면 mapping 할 때 빠트리기 쉬워요 (경험담)
fontSize = 20.sp, | ||
color = Color.White, | ||
modifier = Modifier.align(Alignment.Center) | ||
text = "서비스 이름", |
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.
R.string 에 있어요
...main/kotlin/ac/dnd/bookkeeping/android/presentation/ui/main/login/main/LoginMainViewModel.kt
Outdated
Show resolved
Hide resolved
} | ||
|
||
private fun loginKakao() = launch { | ||
loginKakaoUseCase.invoke() |
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.
invoke 생략가능
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.
!!
// TODO : Implement Success Case | ||
// TODO : Check user is New ? | ||
// isNew True -> navigateToOnBoarding() + with kakaoUserInfoModel | ||
// isNew False -> navigateToHome() | ||
} | ||
|
||
is LoginMainEvent.Login.Error -> { |
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.
에러에 모달 띄우기로 고고
카카오 로그인에 실패했다고 대충 적으면 될듯
private fun submitError(error: Throwable) = launch { | ||
_event.emit(LoginMainEvent.Login.Error(error)) | ||
_state.emit(LoginMainState.Init) | ||
} |
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.
Fail 이랑 Error 의 차이
Fail : 사용자의 잘못
Error : 사용자와 무관하게 오류
이부분 고려된거 맞을까요?
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.
적용했습니더🙇♂️
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.
👍
private fun NavHostController.sendKakaoUserModel(kakaoUserModel: KakaoUserInformationModel) { | ||
currentBackStackEntry?.savedStateHandle?.apply { | ||
set( | ||
"kakaoUserModel", |
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.
이거는 LoginOnBoardingConstant 에 추가해서 연결해주세요
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.
넹 밥먹고 수정할께요
@@ -101,6 +144,47 @@ fun LoginMainScreen( | |||
} | |||
} | |||
|
|||
@Composable | |||
private fun SampleComponent() { |
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.
이거 왜 Sample 이에요?
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.
요거 디자인 수정 있을거라하셔서
일단 위치만 그려서 넣었습니다
디테일할 때 image로 넣으려구용
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.
ㄱㄱ
설명
참고
체크리스트