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

[Feat/#23] sign in #24

Merged
merged 8 commits into from
Jul 30, 2024
Merged

[Feat/#23] sign in #24

merged 8 commits into from
Jul 30, 2024

Conversation

chattymin
Copy link
Member

⛳️ Work Description

  • �자동 로그인 과정에서 splash에서의 분기처리 설정
  • login 및 토큰 저장

📢 To Reviewers

  • 우하하
  • 온보딩은 이제 쉽네용 키키
  • 늘 먹던 그맛...

Copy link
Member

@Marchbreeze Marchbreeze left a comment

Choose a reason for hiding this comment

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

음 ~ 아는 맛 최고

Comment on lines 20 to 27
private val _tokenState = MutableSharedFlow<Boolean>(replay = 1)
val tokenState: SharedFlow<Boolean>
get() = _tokenState

private val _userState = MutableSharedFlow<Boolean>()
val userState: SharedFlow<Boolean>
get() = _userState

Copy link
Member

Choose a reason for hiding this comment

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

저는 UiState 말고 Boolean 값을 활용하는 SharedFlow의 경우 변수명에 State를 안넣는 편이기는 합니다 ! 헷갈림 방지용이랄까

Copy link
Member Author

Choose a reason for hiding this comment

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

오홍 그게 더 좋을 것 같네요!
Compose만 했더니 네이밍도 이제 헷갈리네요 하핳...

Comment on lines 54 to 62
private fun observeUserState() {
viewModel.userState.flowWithLifecycle(lifecycle).onEach { state ->
navigateToScreenClear<OnboardingActivity>()
if (state) {
navigateToScreenClear<OnboardingActivity>()
} else {
toast(getString(R.string.error_msg))
}
}.launchIn(lifecycleScope)
}
Copy link
Member

Choose a reason for hiding this comment

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

이렇게 Boolean 값을 받아와서 if 문에 넣는 경우, state 대신 isBlank -> 같은 변수명을 사용해주는게 더 가독성이 좋을 것 같아요!

Copy link
Member Author

Choose a reason for hiding this comment

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

아 복붙 딱들켰다 ㅋㅋ

@chattymin chattymin merged commit 1b69aad into develop Jul 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Splash / SignIn
2 participants