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 [#360] 3차 스프린트 건의사항 반영 #361

Merged
merged 3 commits into from
Mar 9, 2024
Merged

Conversation

Heyjooo
Copy link
Contributor

@Heyjooo Heyjooo commented Mar 7, 2024

⛏ 작업 내용

  • 유저대상 공지 다시 보지 않기 -> 오늘 하루 보지 않기 로 변경

📌 PR Point!

  • UserDefaults에 Date 타입의 object를 추가하여 오늘 날짜와 비교하는 함수로 하루가 지났는지 지나지 않았는지를 판단합니다.

📸 스크린샷

구현 내용 스크린샷
화면종류 X

✅ Issue

Resolved #360

@Heyjooo Heyjooo added fix⚙️ 오류 고치는 것 희주🍀 labels Mar 7, 2024
@Heyjooo Heyjooo self-assigned this Mar 7, 2024
Copy link
Collaborator

@chaentopia chaentopia left a comment

Choose a reason for hiding this comment

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

P5
고생하셨습니다!!

let startOfToday = calendar.startOfDay(for: currentDate)
let startOfTappedDate = calendar.startOfDay(for: date)

return calendar.dateComponents([.day], from: startOfTappedDate, to: startOfToday).day ?? 0 > 0
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은 bool 값으로 보내주는 건가요?
혹시 그냥 false로 설정하지 않은 이유가 있을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(day ?? 0 ) > 0 으로 봐주시면 될 것 같습니다 !!

Copy link
Member

@Zoe0929 Zoe0929 left a comment

Choose a reason for hiding this comment

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

P5. 고생했습니다! 최고최고

@@ -96,13 +96,19 @@ extension NotificationView {
isTapped.toggle()
doNotSeeAgainButton.setImage(UIImage(imageLiteralResourceName: isTapped ? "btnCheckBox" : "btnNotCheckBox"), for: .normal)
UserDefaults.standard.set(isTapped, forKey: "isTapped")
if isTapped {
UserDefaults.standard.set(Date(), forKey: "whenTapped")
Copy link
Member

Choose a reason for hiding this comment

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

P5. 진짜진짜 의견인데 whenTapped 보다는 TapDate와 같이 명사 형태가 좋을 것 같습니다! isTapped는 bool형이라 변수명이 저 형태였던 것 같아요

Copy link
Contributor Author

Choose a reason for hiding this comment

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

헉 넵 반영하겠습니다 !!

@Heyjooo Heyjooo merged commit 5145a4b into develop Mar 9, 2024
@Heyjooo Heyjooo deleted the feat/#360 branch March 9, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix⚙️ 오류 고치는 것 희주🍀
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Feat] 3차 스프린트 건의사항 반영
3 participants