-
Notifications
You must be signed in to change notification settings - Fork 0
[#215] 푸시 알림에서 기록을 사용자가 제거하면 동일 todo에 대한 반복 알림이 오는 현상을 해결한다 #217
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
869d9d6
feat: 중복용 데이터 컬렉션과 유저가 인터렉션하는 컬렉션 분리
opficdev 73b4330
style: 변수명 수정
opficdev 943aeeb
feat: todo가 제거되면 중복 처리 컬렉션에서도 제거되도록 추가
opficdev 6c10d26
feat: todo가 제거되었을 때, 푸시알림 리스트에서도 제거되도록 추가
opficdev 1c64386
feat: todo가 완료되고 dueDate도 이미 지났을 때 receipt에서 제거되도록 구현
opficdev 4cac1de
fix: 최신 Todo 상태를 기준으로 리마인더 알림을 발송하도록 수정
opficdev 082e2ad
fix: 마감일이 지난 완료 Todo의 receipt를 주기적으로 제거하도록 수정
opficdev 2a91ddf
fix: 오래된 Todo receipt 정리 배치를 추가하고 remove 네이밍으로 정리
opficdev 40494d4
refactor: 년월일 로직 단순화 및 추출 실패 시 경고 로그 출력
opficdev 6158168
refactor: 공통 로직 병합
opficdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| const DEFAULT_TIMEZONE = "UTC"; | ||
|
|
||
| export function resolveTimeZone(settings: FirebaseFirestore.DocumentData | undefined): string { | ||
| const candidate = settings?.timeZone ?? settings?.timezone ?? settings?.region; | ||
| if (typeof candidate !== "string" || !candidate.trim()) { return DEFAULT_TIMEZONE; } | ||
|
|
||
| try { | ||
| new Intl.DateTimeFormat("en-US", { timeZone: candidate }).format(new Date()); | ||
| return candidate; | ||
| } catch { | ||
| return DEFAULT_TIMEZONE; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatDateKey함수에 잠재적인 버그와 비효율적인 부분이 있습니다.parts.find(...)가undefined를 반환하면Number(undefined)는NaN이 됩니다. 이로 인해 문서 ID가NaN-NaN-NaN과 같은 형태로 생성될 수 있습니다.{ month: "2-digit", day: "2-digit" }옵션으로 인해 월과 일은 이미 0으로 채워진 2자리 문자열(예: "05")입니다. 이를 숫자로 변환했다가 다시 문자열로 변환하는 과정은 불필요합니다.formatToParts가 반환하는 값을 직접 사용하고,undefined를 안전하게 처리하도록 함수를 개선하는 것이 좋습니다. 아래와 같이 수정하는 것을 제안합니다.