Skip to content

[#415] 위젯 싱크 트리거를 수정한다#511

Merged
opficdev merged 6 commits into
developfrom
refactor/#415-widget-sink
Jun 1, 2026
Merged

[#415] 위젯 싱크 트리거를 수정한다#511
opficdev merged 6 commits into
developfrom
refactor/#415-widget-sink

Conversation

@opficdev

@opficdev opficdev commented Jun 1, 2026

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • 앱/위젯 데이터 변경 경로에서 위젯 스냅샷 갱신 요청이 누락되지 않도록 동기화 트리거 보강

📝 작업 내용

📌 요약

  • Todo 추가, 수정, 삭제, 삭제 취소 성공 시 위젯 동기화 요청 추가
  • 위젯 표시 설정 변경 시 위젯 동기화 요청 추가
  • 인증 세션 복구 시 1회 위젯 동기화 요청 추가
  • App handler 의존성을 service 중심으로 정리

🔍 상세

  • TodoRepositoryImpl에서 upsertTodo, deleteTodo, undoDeleteTodo 성공 이후 WidgetSyncEventBus.syncRequested 발행
  • UserPreferencesRepositoryImpl에서 setHeatmapActivityTypes, setTodayDisplayOptions 성공 이후 위젯 동기화 요청 발행
  • WidgetSessionSyncHandler 추가로 로그인 세션 true 첫 진입 시 위젯 동기화 요청 처리
  • 로그아웃 후 재로그인 시 세션 동기화 요청이 다시 발생하도록 상태 초기화 처리
  • PushNotificationOpenHandler의 analytics 기록 의존성을 TrackAnalyticsEventUseCase에서 AnalyticsService로 변경
  • 변경된 동기화 트리거 동작을 검증하는 repository 및 handler 테스트 추가

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 1, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces widget synchronization functionality by adding WidgetSessionSyncHandler to observe login session changes and publishing sync events from TodoRepositoryImpl and UserPreferencesRepositoryImpl upon data modifications. Review feedback suggests maintaining the original objectVersion in the Xcode project file to minimize version control noise and ensuring thread safety in WidgetSessionSyncHandler by receiving events on the main queue to prevent potential data races.

Comment thread Application/DevLogData/DevLogData.xcodeproj/project.pbxproj
@opficdev opficdev merged commit f2200aa into develop Jun 1, 2026
1 check passed
@opficdev opficdev deleted the refactor/#415-widget-sink branch June 1, 2026 13:30
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.

위젯 싱크 트리거를 수정한다

1 participant