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

#42 [feat] 데일리 루틴 #45

Merged
merged 22 commits into from
Jan 14, 2024
Merged

Conversation

emjayMJkim
Copy link
Member

@emjayMJkim emjayMJkim commented Jan 12, 2024

📑 Work Description

  • 데일리 루틴 뷰
  • 데일리 루틴 삭제 & 달성하기
  • 커스텀 스낵바 생성

🛠️ Issue

📷 Screenshot

feat.daily.routine.edit.finish.mp4

💬 To Reviewers

커스텀 스낵바를 만들었는데 위치를 bottom navi 위로 올려야 하는데 방법이 생각이 안나서 일단 위치 계산해서 넣었습니다(좋은 방법 있으면 알려주세요ㅜ)
'완료하기' 버튼 클릭시 바텀시트 이미지에 해당 데일리 루틴의 이미지 넣는 것은 서버통신 붙이면서 연결하겠습니다 (지금은 그냥 drawable 이미지로 넣었습니다)

@emjayMJkim emjayMJkim self-assigned this Jan 12, 2024
@emjayMJkim emjayMJkim added Pull Request pr 날림! Feat 새로운 기능 추가 민정🦊 민정이가 작업함! labels Jan 12, 2024
Copy link
Collaborator

@pump9918 pump9918 left a comment

Choose a reason for hiding this comment

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

민정이 덕에 빠르게 나아간다...
고생 너무 많았습니다!

viewModel.isEditBtnEnabled.observe(viewLifecycleOwner) { isBtnEnabled ->
if (isBtnEnabled) {
binding.btnDailyRoutineDelete.setOnClickListener {
BindingBottomSheet.Builder().build(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Builder( )함수는 어떤 역할을 하나요??

Copy link
Member Author

Choose a reason for hiding this comment

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

builder 패턴은 필요한 parameter만 설정해두면 build 메소드를 통해 객체를 생성할 수 있습니다..! 여기서 제가 공통 바텀시트를 만들어 두어서 이 builder 패턴을 통해서 각 뷰에서 커스텀되는 parameter만 넣어주면 바텀시트를 생성할 수 있습니다!!

Copy link

Choose a reason for hiding this comment

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

빌더 패턴까지 사용하시다니 정말 대단하군요 디자인패턴 공부 많이 한게 느껴졌어요. 저희꺼 바텀시트도 빌더로 만들어주세요 !!

binding.tvDailyRoutineEdit.setOnClickListener {
val intent = Intent(requireActivity(), DailyRoutineEditActivity::class.java)
startActivity(intent)
private fun initSetDailyRoutineContent() {
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
Member

@minemi00 minemi00 left a comment

Choose a reason for hiding this comment

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

고맙다민정아,,, 수고했어!!!!!

Comment on lines 37 to 44
private fun routineItemView(routineTitle: TextView, achieveMsg: TextView, index: Int) {
viewModel.mockDailyRoutineList.observe(viewLifecycleOwner) { dailyRoutineList ->
val achieveCountMsg =
getString(R.string.daily_routine_ing).format(dailyRoutineList[index].achieveCount)
achieveMsg.text = achieveCountMsg
routineTitle.text = dailyRoutineList[index].content
}
}
Copy link
Member

Choose a reason for hiding this comment

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

루틴이 며칠째 달성중인지 알려주는 코드를 어떻게 짜야할지 고민했었는ㄴ데 이런식이군요 ....

val routineAddList = listOf<Int>(1, 2)
// val routineAddList = listOf<Int>(1, 2)

private val _mockDailyRoutineList: MutableLiveData<List<DailyRoutine>> = MutableLiveData(
Copy link
Member

Choose a reason for hiding this comment

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

목데이터라도 잘 짜놓을껄...

@emjayMJkim emjayMJkim changed the title #42 [feat] 데일리 루틴 삭제 #42 [feat] 데일리 루틴 Jan 14, 2024
Copy link
Contributor

@stellar-halo stellar-halo left a comment

Choose a reason for hiding this comment

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

고생했어요~~


private fun initSetDeleteView() {
viewModel.isDeleteView.observe(viewLifecycleOwner) { isDeleteView ->
if (!isDeleteView) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if문 안에는 ! 연산자를 넣지 않는 것이 좋다고 합니다!

Copy link
Member Author

Choose a reason for hiding this comment

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

앗 네엡 수정하겠습니다!

@emjayMJkim emjayMJkim merged commit e178803 into develop Jan 14, 2024
1 check passed
@emjayMJkim emjayMJkim deleted the feature/#42-dailyroutine-delete branch January 14, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 추가 Pull Request pr 날림! 민정🦊 민정이가 작업함!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[feat] 데일리 루틴 삭제
5 participants