-
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
[Feature/#9] week06 #10
base: feature/#7-week04
Are you sure you want to change the base?
Conversation
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.
ꡬνμ²΄κ° domain μ μκ³ μΆμμ²΄κ° data layer μ μ‘΄μ¬νλ κ² κ°μμ! κ·Έλ¦¬κ³ λ·°λͺ¨λΈμ μΆμ체λ₯Ό inject λ°κ² λμ΄ μꡬμ! μμ‘΄μ± λ°©ν₯μ μμ μ΄ νμ ν κ² κ°μ΅λλ€!
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.
μκ³ νμ ¨μ΅λλ€!!!!
interface UserRepository { | ||
suspend fun signUp(username: String, password: String, hobby: String): Result<UserEntity> | ||
suspend fun login(username: String, password: String): Result<String> | ||
suspend fun getHobby(token: String): Result<String> | ||
fun saveUserInfo(userEntity: UserEntity) | ||
fun saveUserToken(token: String) | ||
fun getUserInfo(): Result<UserEntity> | ||
fun getToken(): String? | ||
fun isLoggedIn(): Boolean | ||
fun logout() |
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.
Repositoryμ λ©μλλ suspendλ‘ μ§μ λκ±°λ, λλ Flowλ₯Ό λ°νκ°μΌλ‘ μ§μ νλ κ² λ μ€ νλκ° κΆμ₯λκ³ μμ΅λλ€. sharedPreferencesλ₯Ό μ΄μ©νλ―λ‘ λΉμ₯μ suspendμΌ νμλ μμ§λ§, DataStoreλ‘ μ΄μ λ κ°λ₯μ±μ μ΄μ΄λλ€λ©΄ suspendλ‘ μ§μ λλ©΄ μ’μ κ² κ°μ΅λλ€!!
https://developer.android.com/topic/architecture/data-layer?hl=ko#expose-apis
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.
stateλ‘ κ΄λ¦¬νλ κ±°κΉμ§ μ μ©νμ ¨κ΅°μ! π μ λ λ€μκ³Όμ μ μ μ½λλ¦ν© μ μ©ν΄λ³΄λλ‘ νκ² μ΅λλΉ
import org.sopt.and.data.datasource.UserDataLocalSource | ||
import org.sopt.and.data.datasource.UserRemoteDataSource | ||
import org.sopt.and.data.repository.UserRepository |
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.
domainμμλ λ€λ₯Έ λ μ΄μ΄μ λν μμ‘΄μ±μ΄ μμ΄μΌν κ±° κ°μ΅λλΉ!
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.
μκ³ νμ ¨μ΅λλ€!
signUpEvent = SignUpEvent.Success(userEntity.username), | ||
isLoading = false | ||
) | ||
} | ||
}.onFailure { exception -> | ||
_signUpEvent.emit(SignUpEvent.Failure("νμκ°μ μ€ μ€λ₯ λ°μ: ${exception.message}")) | ||
_uiState.update { | ||
it.copy( | ||
signUpEvent = SignUpEvent.Failure(exception.message ?: "νμκ°μ μ€ μ€λ₯κ° λ°μνμ΅λλ€"), |
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.
κ³ μνμ΄μ!
initialValue = false | ||
).value | ||
fun MyPageRoute( | ||
navController: NavController, |
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.
navControllerλ₯Ό νμ Composableμ μΈμλ‘ λκΈ°λ κ²μ κΆμ₯λλ λ°©μμ΄ μλλλ€.
νλ¨ κ³΅μλ¬Έμ μΌμ΄λ³΄λ©΄ μ’μ κ² κ°μμ!
https://developer.android.com/develop/ui/compose/navigation?hl=ko#testing-nav-host
Related issue π
Work Description βοΈ
Screenshot πΈ
νλ©΄μ μ μ£Όμ λμΌν©λλ€!
Uncompleted Tasks π
To Reviewers π’