-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: 7주차 필수 과제 구현 #12
base: develop
Are you sure you want to change the base?
Conversation
- ui -> presentation 수정
- feat(signInContract): Contract 구현 - refactor(signInViewModel): mvvm -> mvi 구조 변경
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.
7차 과제도 수고하셨습니다 !!
data class OnUserNameChanged(val name: String) : Event() | ||
data class OnUserPasswordChanged(val password: String) : Event() | ||
data object TogglePasswordVisibility : Event() | ||
data object OnSignInClick : Event() |
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.
네이밍하실 때 앞에 On은 왜 붙는걸까요 ?!
viewModel.clearSnackbarMessage() | ||
} | ||
} | ||
LaunchedEffect(viewModel.uiSideEffect, lifecycleOwner) { |
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.
Unit이 아닌 viewmodel.uiSideEffect를 쓰신 이유가 있을까요 ??
) { | ||
|
||
val uiState by viewModel.uiState.collectAsStateWithLifecycle() | ||
val lifecycleOwner = LocalLifecycleOwner.current |
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.
오오 .. 이건 뭔지 설명해주실 수 있을까요 ?? lifecycle을 관리하는 또다른 방법인걸까유
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.
MVI 적용 수고하셨습니다~~~
fun isNotBlank(): Boolean = | ||
name.isNotBlank() && password.isNotBlank() && hobby.isNotBlank() | ||
} |
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.
이건 validation 체크하는 부분 맞죠?!?? data class에서 구현하신 이유가 궁금해요!!
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.
추가로 서버 명세에는 8글자 이하 글자제한도 있는데 Blank만 체크하시는 이유가 궁금합니다!
onSignInClick = { | ||
viewModel.setEvent(SignInContract.Event.OnSignInClick) | ||
}, | ||
onSignUpClick = navigationToSignUp, |
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.
onSignUpClick은 sideEffect를 사용하지 않고 바로 화면 전환을 해주었는데 따로 이유가 있으신건지 궁금합니다!
private fun updateLogin(update: Login.() -> Login) = | ||
setState { copy(login = login.update()) } |
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.
Login 네이밍을 수정해보는 것도 좋을 것 같아요! 저는 Login 이라는 이름을 처음 들었을 때는 모델보다는 함수가 더 먼저 떠올라서요!!
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 updateLogin(update: Login.() -> Login) = |
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 updateLogin(update: Login.() -> Login) = | ||
setState { copy(login = login.update()) } | ||
|
||
private fun togglePasswordVisibility() = |
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.
얘두 ㅎ.ㅎ
Related issue 🛠
Work Description ✏️
Screenshot 📸
week7.mp4
Uncompleted Tasks 😅
To Reviewers 📢