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

Feat/#10 홈 화면 구현 #36

Merged
merged 59 commits into from
Jan 7, 2024
Merged

Feat/#10 홈 화면 구현 #36

merged 59 commits into from
Jan 7, 2024

Conversation

bamin0422
Copy link
Collaborator

🧨이슈

🔍 상세 내용 (해결 내용)

  • 홈화면 구성 (해당 브랜치에서 자식 브랜치 생성해, 기능 구성해 나갈 예정)

💡 참고자료 및 공유할만한 자료 (선택)

❕후속 진행 이슈

@bamin0422 bamin0422 requested review from JJJoonngg and posite November 2, 2023 14:55
@bamin0422 bamin0422 self-assigned this Nov 2, 2023
<category android:name="android.intent.category.BROWSABLE" />

<data android:host="oauth"
android:scheme="kakao6c28960f69d4c7f00043b02d890dd6e0" />
Copy link
Member

Choose a reason for hiding this comment

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

굳이 수정은 안해도 되지만 scheme 같은건 나중에 string으로 모아보면 편할거 같아유~

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵넵 string으로 모아놓는게 좋을 거 같네요 ㅎㅎ 감사합니다.

) {
enum class AuthProvider {
GOOGLE, KAKAO, APPLE
}
Copy link
Member

Choose a reason for hiding this comment

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

별도의 enum class로 빼주는게 추후에 다른 곳에서 사용시 편할 수 있슴다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

별도로 분리할께요!

val accessToken: String,
@SerializedName("refresh_token")
val refreshToken: String,
)
Copy link
Member

Choose a reason for hiding this comment

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

Token이라는 단어는 여기서만 사용되면 상관이 없지만 좀 더 범용적으로 사용되는 단어이니
별도의 data class로 빼고 SignUpResponseToken 과 같은 specific한 네이밍을 하면 좋슴다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오 좋네요! 수정하겠습니다!!

holder.bind(getItem(position))
}
}

class DdayAdapterViewHolder(private val binding: ItemDDayBinding, private val clickEvent: (id: Int) -> Unit = {}) : RecyclerView.ViewHolder(binding.root) {
Copy link
Member

Choose a reason for hiding this comment

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

한 file의 2가지 이상의 class가 있는건 지양하는게 좋습니다.

diffutil은 companion object로 선언해도 충분할듯하고~!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

diffutil companion object로 선언했어요~ viewholder 클래스들을 어떻게 분리할지 조금 더 고민해볼께요!!


override fun onResume() {
super.onResume()
window.statusBarColor = getColor(this, R.color.yellow_fefaea)
Copy link
Member

Choose a reason for hiding this comment

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

한줄짜리함수도 좀 더 가독을 높이려면
setStatusBarColor() 와 같이 추상화 단계를 쪼개면 좋습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

리뷰 반영해서 반복되는 함수 가독성 높이고, 사용하기에 용이하도록 protected 속성으로, BaseActivityBaseFragment에 추가했습니다! 감사합니다.


@RequiresApi(Build.VERSION_CODES.O)
private fun checkDate(dateString: String): Boolean {
val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd")
Copy link
Member

Choose a reason for hiding this comment

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

"yyyy-MM-dd" 이런부분도 상수화 해주면 좋습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

상수화했습니다!

setSelection(text.length)
}
setLabelBirthWarn(text.length == 10)
}
Copy link
Member

Choose a reason for hiding this comment

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

매직넘버~~

Copy link
Member

Choose a reason for hiding this comment

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

if else문이 많은데 when으로도 수정 될거 같아요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

매직넘버 수정했고, when절로 수정했습니다!! 감사합니다!!

class MyPageViewModel @Inject constructor() : BaseViewModel() {
private val _closeButtonClicked: SingleLiveEvent<Unit> = SingleLiveEvent()
val closeButtonClicked: LiveData<Unit> = _closeButtonClicked
private val _editButtonClicked: SingleLiveEvent<Unit> = SingleLiveEvent()
Copy link
Member

Choose a reason for hiding this comment

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

변수별로 행구분은 해줘요~

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

행구분 했습니다~ 감사합니다!!

MutableLiveData()
val myColorStatus: LiveData<MutableMap<MyColorType, ColorStatus>> = _myColorStatus

init {
Copy link
Member

Choose a reason for hiding this comment

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

init 에 별도의 함수를 넣는것도 좋지만
개인적으론 사용하는 view에서 onResume 이나 onCreate 이후에 fetchXXX() 함수들을 호출하거나
viewModel.initViewModel() 과 같은 것들을 불러주는게 좋다고 생각해요
-> 생명주기에 대해 얽혀서 발생하는 이슈들이 적어질 겁니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

오 감사합니다! 네트워크 모듈 연결 후 참고해서 수정하겠습니다!!

@bamin0422 bamin0422 merged commit a0e358b into develop Jan 7, 2024
bamin0422 added a commit that referenced this pull request Jun 26, 2024
Merge pull request #36 from TeamOwori/feat/#10-홈-화면-구현
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants