Skip to content
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] 프로필 생성 기능 제작 #62

Merged
merged 4 commits into from
Feb 13, 2024

Conversation

ham2174
Copy link
Collaborator

@ham2174 ham2174 commented Feb 13, 2024

관련 이슈

작업한 내용

  • 프로필 생성 기능 제작
Screen_recording_20240214_004615.mp4

PR 포인트

  • CreateProfileScreen에서 사용되는 ProfileUiModel 제작
  • CreateProfileUiState로 모델과 Ui 상태 관리
  • CreateProfileEvent로 이벤트 상태 관리

🚀Next Feature

  • 내 프로필 기능 제작

@ham2174 ham2174 added the ham😸 Good for newcomers label Feb 13, 2024
@ham2174 ham2174 requested a review from murjune February 13, 2024 15:47
@ham2174 ham2174 self-assigned this Feb 13, 2024
Copy link
Member

@murjune murjune left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿 상태 관리 빡셌을텐데 고생하셨습니다!! 👍 👍
comment 한 번 봐주세욥

엄청 크리티컬한 부분은 아니 생각되어 바로 머지하셔도 괜찮�아유~

Comment on lines +83 to +94
LaunchedEffect(Unit) {
viewModel.event.collect { event ->
when (event) {
is CreateProfileEvent.NavigateToHome -> {
onNavigateToHome()
}
is CreateProfileEvent.ShowError -> {
// @Gun Hyung TODO : 에러 메시지 호출
}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이렇게 하게될 경우 사용자가 Home 버튼을 누르고 나갈 때도 Event 를 collect()하게 될 것 같아!

따라서, .collectAsStateWithLifecycle() 를 사용하는게 좋을 거 같습니당

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사용자가 앱을 중간에 나가도 Event를 수집하는 형태가 괜찮다고 판단해서 .collect()를 사용했어!
만일 서버 요청 상태가 오래 지속되는 작업이라면 sharedFlow를 사용하지않으면서 .collectAsStateWithLifecycle()를 사용했을것 같아.
거기다 현재 Event를 SharedFlow로 정의해놓아서 .collectAsStateWithLifecycle()를 사용하게되면 현재 초기값을 넣어주어야 하는것으로 알고있는데 그러면 Event를 정의할 때 'None' 상태를 하나 추가해두어야 하는걸까?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사용자가 앱을 중간에 나가도 Event를 수집하는 형태가 괜찮다고 판단해서 .collect()를 사용했어!
만일 서버 요청 상태가 오래 지속되는 작업이라면 sharedFlow를 사용하지않으면서 .collectAsStateWithLifecycle()를 사용했을것 같아.

이런 이유라면 지금 로직 찬성입니다~ (뭔가 이런 의도일거라 생각해서 머지해도 찬성함 ㅋㅋㅋ😁)

Copy link
Member

@murjune murjune Feb 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

결론)지금 로직 좋습니당 머지고고~

@ham2174 ham2174 merged commit 40fbcf3 into develop Feb 13, 2024
1 check passed
@ham2174 ham2174 deleted the feature/feat-profile-create branch February 13, 2024 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ham😸 Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 프로필 생성 기능 제작
2 participants