-
Notifications
You must be signed in to change notification settings - Fork 3
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
An/feature/615 profile #616
base: develop
Are you sure you want to change the base?
Conversation
- FinishedStudyUiModel - UserProfileUiModel
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.
๋ฐ๊ณต์ฌ(๋ฐ์ดํฐ๋ฐ์ธ๋ฉ ์ ๊ฑฐ ๋๊ณต์ฌ) ๊ณ ์ํ์
จ์ต๋๋ค.
์ฌ์ค Hotflow๋ ๋ผ์ด๋ธ๋ฐ์ดํฐ์ ํฌ๊ฒ ๋ค๋ฅผ์ ์ด ์์ฃ
ํ
์คํธ๋ฅผ ๋ณ๋๋ก ์งํํ์ง ์๋๋ค๋ฉด, ์ง๊ธ์ ํฌ๊ฒ ์ด์ ์ ๋๋๊ณณ์ด ์๋ค๊ณ ์๊ฐํจ๋ฏธ๋ค
@@ -24,17 +24,34 @@ fun ProfileResponseDto.toDomain(): UserProfile = UserProfile( | |||
finishedStudies = finishedStudies.map { it.toDomain() }, | |||
) | |||
|
|||
fun ProfileResponseDto.toEntity(): UserProfileEntity = UserProfileEntity( |
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.
์ด๊ฒ๋ ํ ์ปจ๋ฒค์ ์ ๋ง์ถฐ๋ณผ๊น์?
@@ -0,0 +1,8 @@ | |||
package com.created.team201.data.model | |||
|
|||
import com.created.domain.model.Profile |
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.
์์ฝ๊ฒ๋ ๋ฐ์ดํฐ๊ฐ ๋๋ฉ์ธ์ ์์๋ฒ๋ ธ์๋๋ค..
package com.created.team201.data.model | ||
|
||
data class FinishedStudyEntity( | ||
val id: Long, |
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.
์ด id๊ฐ ๋ทฐ์์ ์ฌ์ฉ๋๋ ์ผ์ด ์๋์?
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.
๊ณ ์ํ์ จ์ต๋๋ค ๋ฅ๋ฅ!
PR ์ ๋ชฉ ์์ ๋ถํ๋๋ฆฝ๋๋ค.!
sealed interface ProfileUiState { | ||
data class Success(val userProfile: UserProfileEntity) : ProfileUiState | ||
object Failure : ProfileUiState | ||
object Loading : ProfileUiState | ||
} |
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.
์ ์์ ์ธ ์ฌ์ฉ์ด๊ตฐ์ ๐
private fun ImageView.setImage(image: Int) { | ||
Glide.with(context) | ||
.load(image) | ||
.into(this) | ||
} |
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.
์์ฃผ ๋ณด์ด๋ ํจ์ ์ธ๊ฑฐ ๊ฐ์๋ฐ ์ ํธ๋ก ๋นผ๋๋ ์ข๊ฒ ๋ค๋ ์๊ฐ์ด ๋ญ๋๋ค!
ImageView.setImage(image: Int)
์ ํ๋ผ๋ฏธํฐ๋ก @DrawableRes
์ด๋
ธํ
์ด์
์ถ๊ฐํด์ค๋ ์ข์๋ฏ ํฉ๋๋ค!
private fun updateProfile(userProfile: UserProfileEntity) { | ||
binding.ivProfileImage.setImage(userProfile.profile.profileImageUrl) | ||
binding.tvProfileUserName.text = userProfile.profile.profileInformation.nickname.nickname | ||
binding.tvProfileUserGithubId.text = userProfile.profile.githubId | ||
binding.layoutProfileStudySuccessRate.result = | ||
getString(R.string.profile_success_rate_format).format(userProfile.profile.successRate) | ||
binding.layoutProfileTodoSuccessRate.result = | ||
getString(R.string.profile_mustdo_success_rate_format).format(userProfile.profile.successfulRoundCount) | ||
binding.tvProfileUserDescription.text = userProfile.profile.profileInformation.introduction | ||
finishedStudyAdapter.submitList(userProfile.finishedStudies) | ||
binding.layoutProfileTodoSuccessRate.isVisible = true | ||
binding.layoutProfileStudySuccessRate.isVisible = true | ||
} |
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.
์ค... ๋ทฐ๋ฐ๋ก ๋นผ๋.. ์๊ฐ๋ณด๋ค ์์ฒญ๋๊ฒ ์กํฐ๋นํฐ๊ฐ ๋ฑ๋ฑํด์ง๋๊ตฐ์ ใ ใ
@@ -24,17 +24,34 @@ fun ProfileResponseDto.toDomain(): UserProfile = UserProfile( | |||
finishedStudies = finishedStudies.map { it.toDomain() }, | |||
) | |||
|
|||
fun ProfileResponseDto.toEntity(): UserProfileEntity = UserProfileEntity( |
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.
์ด๊ฒ๋ ํ ์ปจ๋ฒค์ ์ ๋ง์ถฐ๋ณผ๊น์?
๐ ์์ ํ ๋ด์ฉ
๐ PR Point
๐ ๊ด๋ จ ์ด์
ํ์ฌ release์์ ํ๋กํ ๋ทฐ๊ฐ ์ ์์๋ํ์ง ์๋๋ต๋๋ค.. (ํํ)
๋ค์ ์ ๋ฐ์ดํธ ๋ ์ถ๊ฐํด์ผํฉ๋๋ค...