Skip to content

[#683] timeZone 동기화 요청을 사용자와 timeZone 기준으로 제한한다#685

Merged
opficdev merged 1 commit into
developfrom
fix/#683-timezone
Jul 3, 2026
Merged

[#683] timeZone 동기화 요청을 사용자와 timeZone 기준으로 제한한다#685
opficdev merged 1 commit into
developfrom
fix/#683-timezone

Conversation

@opficdev

@opficdev opficdev commented Jul 3, 2026

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

foreground 복귀와 로그인 세션 전이에서 timeZone 동기화 요청을 유지하되, 동일 (uid, timeZoneIdentifier) 조합의 반복 DB write 방지

📝 작업 내용

📌 요약

  • UserTimeZoneSyncHandler 동기화 기준을 로그인 세션 이벤트와 App layer timeZone 요청 이벤트로 조정
  • 마지막 성공 동기화 기준을 메모리에 캐싱해 동일 사용자/timeZone 반복 write 방지
  • foreground 전환 시 AppDelegate에서 timeZone 동기화 요청 이벤트 전달
  • UserTimeZoneSyncHandlerTests 추가

🔍 상세

  • UserTimeZoneSyncHandler에서 UIKit 의존성 제거
  • AuthService.observeSignedIn() 관찰 추가
  • 로그아웃 시 lastSyncedKey 초기화
  • updateUserTimeZone() 성공 후에만 (uid, timeZoneIdentifier) 캐시 갱신
  • AppDelegate에서 UIApplication.willEnterForegroundNotification 수신 후 .didRequestUserTimeZoneSync 전달
  • 로그인 세션 전이, foreground 요청, 중복 skip, 사용자 변경, 로그아웃 초기화, 실패 시 캐시 미갱신 테스트 추가

검증

  • production 변경 파일 SwiftLint 통과
  • test 변경 파일 SwiftLint 통과
  • build_sim은 기존 ComposableArchitecture.Scope.init linker 오류로 실패

📸 영상 / 이미지 (Optional)

없음

@opficdev opficdev self-assigned this Jul 3, 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

이번 PR은 사용자의 타임존을 동기화하는 UserTimeZoneSyncHandler를 개선하여, 로그인 세션 변경 및 포그라운드 진입 시 중복 동기화를 방지하고 필요한 경우에만 동기화하도록 로직을 리팩토링하고 관련 테스트 코드를 추가합니다. 리뷰어는 AppDelegate에서 UIApplication.willEnterForegroundNotification을 별도로 구독하는 대신 기존의 applicationWillEnterForeground(_:) 생명주기 메서드 내에서 직접 이벤트를 처리하고, 불필요한 @objc 메서드를 제거할 것을 제안했습니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Application/App/Sources/App/Delegate/AppDelegate.swift
Comment thread Application/App/Sources/App/Delegate/AppDelegate.swift
@opficdev opficdev merged commit 247faad into develop Jul 3, 2026
6 checks passed
@opficdev opficdev deleted the fix/#683-timezone branch July 3, 2026 15:35
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.

timeZone 동기화 요청을 사용자와 timeZone 기준으로 제한한다

1 participant