-
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
π :: (#13) λ‘κ·ΈμΈ λΉμ¦λμ€ λ‘μ§ μμ± #28
The head ref may contain hidden characters: "feature/13-\uB85C\uADF8\uC778-\uBE44\uC988\uB2C8\uC2A4-\uB85C\uC9C1-\uC791\uC131"
π :: (#13) λ‘κ·ΈμΈ λΉμ¦λμ€ λ‘μ§ μμ± #28
Conversation
|
||
protected fun postSideEffect(sideEffect: E) { | ||
viewModelScope.launch(Dispatchers.IO) { | ||
this@BaseViewModel._sideEffect.emit(sideEffect) |
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.
μ κ° μκ°νμλλ μμΈκ° λ°μν μΌμ΄ κ΅μ₯ν λλ¬Ό κ² κ°μμ
μλνλ©΄ tryEmit()μ΄λΌλ ν¨μκ° μλλ° μ΄ ν¨μλ non-suspend νκ²½μμ Flowμ κ°μ μ
λ°μ΄νΈνλ μν μ ν©λλ€.
κ·Έλ¦¬κ³ κ° μ
λ°μ΄νΈμ μ±κ³΅νλμ§ μ¬λΆλ₯Ό Boolean κ°μΌλ‘ λ°ννκ² λλλ°, μμΈμ²λ¦¬κ° νμν μν©μ΄λΌλ©΄ emit() λμ μ tryEmit()μ μ°λκ² λ§λ€κ³ μκ°ν©λλ€
μ½νλ¦° 곡μλ¬Έμμμλ thread-safetyν ν¨μλΌκ³ μκ°νκ³ μμ΄μ μμΈμ²λ¦¬λ λ±ν μμ΄λ λ κ² κ°μμ
) { | ||
SignInScreen(onBackClick = onBackClick) | ||
val state by signInViewModel.state.collectAsState() |
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.
collectAsStateλμ μ collectAsStateWithLifecycleμ°λ건 μ΄λ¨κΉμ?
v1λ orbitμ collectAsStateμ΄λμ λ€λ₯΄κ² μλͺ
μ£ΌκΈ°λ₯Ό κ³ λ €νμ§ μμμ λ©λͺ¨λ¦¬κ° λλΉλ κ² κ°μ΅λλ€
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.
μ’μ μκ° κ°μμ©
} | ||
|
||
internal fun signIn() { | ||
freezeButton() |
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.
μ΄κ±° freezeButtonμsuspendλ‘ μ μΈνκ³ signInUseCaseλ₯Ό νΈμΆ ν λ€μ μ€νλλλ‘ νλ©΄ μ§λ ¬μ μΌλ‘ μ€νν μ μμ§ μμκΉμ?
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.
μ μμ
νλ€κ° μκ°ν΄λ΄€λλ° λ‘κ·ΈμΈ λΆλΆμμλ μ΄ ν¨μκ° νμμμ κ² κ°μμ
μκ°ν΄λ³΄λκΉ button μνλ₯Ό trueλ‘ λ§λ€ νμκ° μλκ² κ°μ΅λλΉ
κ°μ
λ‘κ·ΈμΈ λΉμ¦λμ€ λ‘μ§μ μμ±νμ΅λλ€.
μμ λ΄μ©
ν λ§