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

Fix/calendar error #136

Merged
merged 5 commits into from
Mar 3, 2024
Merged

Fix/calendar error #136

merged 5 commits into from
Mar 3, 2024

Conversation

Amepistheo
Copy link
Member

관련 이슈

  • Resolves #

개요

캘린더 관련 기능 구현 및 오류 수정

작업 사항

  • 무한 캘린더 메인에 반영
  • 학식 중복해서 나오는 오류 수정
  • 처음 화면에 값 안나오는거 수정

Check List

  • code formatter 적용 확인 (ctrl + alert + O ⇒ 안쓰는 import 제거 / ctrl + alert + L ⇒ 코드 정렬 등)
  • PR 제목을 커밋 규칙에 맞게 작성
  • PR에 해당되는 Issue를 연결 완료
  • 작업한 사람 모두를 Assign
  • 작업한 팀에게 Code Review 요청 (Reviewer 등록)
  • main 브랜치의 최신 상태를 반영하고 있는지 확인

스크린샷 및 작동 영상

Comment on lines +44 to +45
private var monthYearText: TextView? = null
private var calendarRecyclerView: RecyclerView? = null
Copy link
Member

Choose a reason for hiding this comment

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

별거는 아닌데, 요즘 리팩하면서 드는 생각이 이런경우에 ? =null을 하는게 맞을지, 아니면 non-nullable에 디폴트값(0이나 "")을 넣는게 나을지 고민입니다. 어떠한 방식이 나을까요?

Copy link
Member Author

Choose a reason for hiding this comment

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

음 null을 넣어서 따로 처리하는 것 보다는 디폴트 값을 넣는 것이 데이터를 처리하는데 더 편할 거 같다고 생각이 드네요..!

Comment on lines 80 to 81
val intent = Intent(this, MyPageActivity::class.java) // 인텐트를 생성해줌,
startActivity(intent) // 화면 전환을 시켜줌
Copy link
Member

Choose a reason for hiding this comment

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

요기 화면 이동도 util 함수로 있습니다! startActivity였던 것 같네용

Copy link
Member Author

Choose a reason for hiding this comment

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

넵! 반영해서 수정하도록 하겠습니당

Comment on lines 31 to 34
val layoutParams = view.layoutParams
layoutParams.height = parent.height
layoutParams.width = Gravity.RIGHT
return CalendarViewHolder(binding, view, onItemListener, days)
Copy link
Member

Choose a reason for hiding this comment

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

여기 view.layoutParams가 반복되어서 이렇게 한거라면, 스코프 함수 (apply, let 등)을 이용해보는건 어떠할까요~!

Copy link
Member Author

Choose a reason for hiding this comment

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

오 apply 함수로 변경해서 반영해보도록 하겠습니다!


class CalendarViewModel : ViewModel() {
private val data = MutableLiveData<String>()
private val data = MutableLiveData<LocalDate>()
Copy link
Member

Choose a reason for hiding this comment

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

오호 LocalDate로 사용했을때의 장점이 있을까용?

Copy link
Member Author

Choose a reason for hiding this comment

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

MenuFragment에서도 LocalDate를 사용해야 되니까 굳이 String으로 보낼 필요가 없는거 같아서 수정했습니다!

@HI-JIN2 HI-JIN2 merged commit 0e5c530 into main Mar 3, 2024
1 check passed
@HI-JIN2 HI-JIN2 deleted the fix/calendar-error branch March 20, 2024 19:17
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