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

πŸ”— :: (#13) 둜그인 λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 μž‘μ„± #28

Conversation

Tmdhoon2
Copy link
Member

@Tmdhoon2 Tmdhoon2 commented Feb 1, 2024

κ°œμš”

둜그인 λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ μž‘μ„±ν–ˆμŠ΅λ‹ˆλ‹€.

μž‘μ—… λ‚΄μš©

  • Hilt Module κ΅¬ν˜„
  • UserDataSource, UserRepository κ΅¬ν˜„
  • SignInUseCase κ΅¬ν˜„
  • SignInViewModel κ΅¬ν˜„
  • BaseViewModel κ΅¬ν˜„
  • SignInScreen λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 μ—°κ²°

ν•  말

μ—†μŒ

@Tmdhoon2 Tmdhoon2 added the κΈ°λŠ₯ κ΅¬ν˜„ λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ μž‘μ„±ν•©λ‹ˆλ‹€. label Feb 1, 2024
@Tmdhoon2 Tmdhoon2 self-assigned this Feb 1, 2024
@Tmdhoon2 Tmdhoon2 linked an issue Feb 1, 2024 that may be closed by this pull request
1 task

protected fun postSideEffect(sideEffect: E) {
viewModelScope.launch(Dispatchers.IO) {
this@BaseViewModel._sideEffect.emit(sideEffect)
Copy link
Collaborator

Choose a reason for hiding this comment

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

μ—¬κΈ° μ˜ˆμ™Έμ²˜λ¦¬λŠ” ν•„μš” μ—†μ„κΉŒμš”?

Copy link
Member Author

Choose a reason for hiding this comment

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

μ œκ°€ μƒκ°ν–ˆμ„λ•ŒλŠ” μ˜ˆμ™Έκ°€ λ°œμƒν•  일이 ꡉμž₯히 λ“œλ¬Ό 것 κ°™μ•„μš”
μ™œλƒν•˜λ©΄ tryEmit()μ΄λΌλŠ” ν•¨μˆ˜κ°€ μžˆλŠ”λ° 이 ν•¨μˆ˜λŠ” non-suspend ν™˜κ²½μ—μ„œ Flow에 값을 μ—…λ°μ΄νŠΈν•˜λŠ” 역할을 ν•©λ‹ˆλ‹€.
그리고 κ°’ μ—…λ°μ΄νŠΈμ— μ„±κ³΅ν–ˆλŠ”μ§€ μ—¬λΆ€λ₯Ό Boolean κ°’μœΌλ‘œ λ°˜ν™˜ν•˜κ²Œ λ˜λŠ”λ°, μ˜ˆμ™Έμ²˜λ¦¬κ°€ ν•„μš”ν•œ 상황이라면 emit() λŒ€μ‹ μ— tryEmit()을 μ“°λŠ”κ²Œ λ§žλ‹€κ³  μƒκ°ν•©λ‹ˆλ‹€

μ½”ν‹€λ¦° κ³΅μ‹λ¬Έμ„œμ—μ„œλ„ thread-safetyν•œ ν•¨μˆ˜λΌκ³  μ†Œκ°œν•˜κ³  μžˆμ–΄μ„œ μ˜ˆμ™Έμ²˜λ¦¬λŠ” λ”±νžˆ 없어도 될것 κ°™μ•„μš”

) {
SignInScreen(onBackClick = onBackClick)
val state by signInViewModel.state.collectAsState()
Copy link
Collaborator

Choose a reason for hiding this comment

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

collectAsStateλŒ€μ‹ μ— collectAsStateWithLifecycleμ“°λŠ”κ±΄ μ–΄λ–¨κΉŒμš”?
v1λ•Œ orbit의 collectAsStateμ΄λž‘μ€ λ‹€λ₯΄κ²Œ 수λͺ…μ£ΌκΈ°λ₯Ό κ³ λ €ν•˜μ§€ μ•Šμ•„μ„œ λ©”λͺ¨λ¦¬κ°€ 낭비될것 κ°™μŠ΅λ‹ˆλ‹€

Copy link
Member Author

Choose a reason for hiding this comment

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

쒋은 생각 κ°™μ•„μš©

}

internal fun signIn() {
freezeButton()
Copy link
Collaborator

Choose a reason for hiding this comment

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

이거 freezeButton을suspend둜 μ„ μ–Έν•˜κ³  signInUseCaseλ₯Ό 호좜 ν•œ 뒀에 μ‹€ν–‰λ˜λ„λ‘ ν•˜λ©΄ 직렬적으둜 μ‹€ν–‰ν•  수 μžˆμ§€ μ•Šμ„κΉŒμš”?

Copy link
Member Author

Choose a reason for hiding this comment

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

였 쒋은 생각 κ°™μ•„μš”

Copy link
Member Author

Choose a reason for hiding this comment

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

μ•„ μž‘μ—…ν•˜λ‹€κ°€ μƒκ°ν•΄λ΄€λŠ”λ° 둜그인 λΆ€λΆ„μ—μ„œλŠ” 이 ν•¨μˆ˜κ°€ ν•„μš”μ—†μ„ 것 κ°™μ•„μš”
μƒκ°ν•΄λ³΄λ‹ˆκΉŒ button μƒνƒœλ₯Ό true둜 λ§Œλ“€ ν•„μš”κ°€ μ—†λŠ”κ²ƒ κ°™μŠ΅λ‹ˆλ‹Ή

@Tmdhoon2 Tmdhoon2 merged commit 8239046 into develop Feb 1, 2024
1 check passed
@Tmdhoon2 Tmdhoon2 deleted the feature/13-둜그인-λΉ„μ¦ˆλ‹ˆμŠ€-둜직-μž‘μ„± branch February 1, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
κΈ°λŠ₯ κ΅¬ν˜„ λΉ„μ¦ˆλ‹ˆμŠ€ λ‘œμ§μ„ μž‘μ„±ν•©λ‹ˆλ‹€.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

둜그인 λΉ„μ¦ˆλ‹ˆμŠ€ 둜직 μž‘μ„±
3 participants