Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
이번 PR은 WidgetSyncEventBus와 WidgetSyncEventHandler를 도입하여 위젯 동기화 로직을 이벤트 기반 구조로 리팩토링합니다. 기존 ViewModel에서 직접 수행하던 동기화 로직을 제거하고, 앱이 백그라운드로 진입할 때 이벤트를 발행하여 중앙에서 처리하도록 개선되었습니다. 또한 WidgetSnapshotPreferenceStore, WidgetSnapshotUpdater 등 위젯 데이터 관리를 위한 전용 클래스들을 추가하고 공유 상수를 정의했습니다. 리뷰에서는 WidgetSyncEventHandler의 테스트 용이성을 위해 Calendar와 현재 시간을 제공하는 클로저를 의존성으로 주입받도록 개선할 것을 제안했습니다.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
🔗 연관된 이슈
📝 작업 내용
📌 요약
🔍 상세
scenePhase == .background에서.syncRequested이벤트 발행WidgetSyncEventHandler에서 Today/Heatmap 위젯 스냅샷 갱신 처리Calendar.startOfQuarter(for:)extension 추가 및 중복 계산 로직 제거📸 영상 / 이미지 (Optional)