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

An/feature/615 profile #616

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Conversation

RightHennessy
Copy link
Collaborator

๐Ÿ˜‹ ์ž‘์—…ํ•œ ๋‚ด์šฉ

  • ์ข…๋ฃŒ๋œ ์Šคํ„ฐ๋”” ๋ชฉ๋ก ๋ฒ„๊ทธ ํ”ฝ์Šค
  • uimodel ์ œ๊ฑฐ
  • data binding -> view binding
  • flow ์ ์šฉ
  • uiState ์ ์šฉ

๐Ÿ™ PR Point

  • flow๋ฅผ ์ ์šฉํ•˜๋Š”๊ฒŒ ์˜๋ฏธ๊ฐ€ ์žˆ๋Š”์ง€๋ฅผ ๋ชจ๋ฅด๊ฒ ๋„ค์š”.. ํ›ˆ์ˆ˜ ์ข€ ๋‘ฌ์ฃผ์„ธ์š”

๐Ÿ‘ ๊ด€๋ จ ์ด์Šˆ


ํ˜„์žฌ release์—์„œ ํ”„๋กœํ•„ ๋ทฐ๊ฐ€ ์ •์ƒ์ž‘๋™ํ•˜์ง€ ์•Š๋Š”๋‹ต๋‹ˆ๋‹ค.. (ํ—ˆํ—ˆ)
๋‹ค์Œ ์—…๋ฐ์ดํŠธ ๋•Œ ์ถ”๊ฐ€ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค...

@RightHennessy RightHennessy added android๐Ÿ’š ์•ˆ๋“œ refactor ๋ฆฌํŒฉํ„ฐ๋ง ringring๐Ÿค™ ๋ง๋ง labels Nov 21, 2023
@RightHennessy RightHennessy self-assigned this Nov 21, 2023
Copy link

Test Results

9 testsโ€‚โ€ƒโ€ƒ9 โœ”๏ธโ€ƒโ€ƒ0s โฑ๏ธ
3 suitesโ€ƒโ€ƒ0 ๐Ÿ’ค
3 filesโ€„โ€‚โ€ƒโ€ƒ0 โŒ

Results for commit 543ebf0.

Copy link
Collaborator

@s9hn s9hn left a 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(
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
Collaborator

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
Copy link
Collaborator

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,
Copy link
Collaborator

Choose a reason for hiding this comment

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

์ด id๊ฐ€ ๋ทฐ์—์„œ ์‚ฌ์šฉ๋˜๋Š” ์ผ์ด ์žˆ๋‚˜์š”?

Copy link
Collaborator

@no1msh no1msh left a comment

Choose a reason for hiding this comment

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

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค ๋ฅ‘๋ฅ‘!

PR ์ œ๋ชฉ ์ˆ˜์ •๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.!

Comment on lines +5 to +9
sealed interface ProfileUiState {
data class Success(val userProfile: UserProfileEntity) : ProfileUiState
object Failure : ProfileUiState
object Loading : ProfileUiState
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

์ •์„์ ์ธ ์‚ฌ์šฉ์ด๊ตฐ์š” ๐Ÿ‘

Comment on lines +27 to 31
private fun ImageView.setImage(image: Int) {
Glide.with(context)
.load(image)
.into(this)
}
Copy link
Collaborator

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์–ด๋…ธํ…Œ์ด์…˜ ์ถ”๊ฐ€ํ•ด์ค˜๋„ ์ข‹์„๋“ฏ ํ•ฉ๋‹ˆ๋‹ค!

Comment on lines +77 to +89
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
}
Copy link
Collaborator

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(
Copy link
Collaborator

Choose a reason for hiding this comment

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

์ด๊ฒƒ๋„ ํŒ€ ์ปจ๋ฒค์…˜์„ ๋งž์ถฐ๋ณผ๊นŒ์š”?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android๐Ÿ’š ์•ˆ๋“œ refactor ๋ฆฌํŒฉํ„ฐ๋ง ringring๐Ÿค™ ๋ง๋ง
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

[ํ”„๋กœํ•„ ๋ทฐ] ๋ฆฌํŒฉํ„ฐ๋ง ์ž‘์—…
3 participants