Skip to content

[#488] PushNotificationListViewModel 생성 및 생명주기를 개선한다#500

Merged
opficdev merged 7 commits into
developfrom
fix/#488-PushNotificationListViewModel
May 28, 2026
Merged

[#488] PushNotificationListViewModel 생성 및 생명주기를 개선한다#500
opficdev merged 7 commits into
developfrom
fix/#488-PushNotificationListViewModel

Conversation

@opficdev
Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

PushNotificationListView의 데이터 fetch 시점을 화면 생명주기 기준에서 메인 탭 선택 상태 기준으로 변경하여 Home, Today, Profile과 동일한 탭 재진입 fetch 정책 적용

📝 작업 내용

📌 요약

  • PushNotification 데이터 fetch 트리거를 PushNotificationListView.onAppear에서 MainViewselectedTab 변경 감지로 이동
  • MainViewCoordinator.fetchData() 추가로 다른 메인 탭 뷰와 동일한 Coordinator 호출 구조 적용
  • 메인 탭 요청 트리거 플로우를 DevLog.drawio에 반영
  • App, Widget 아키텍처 이미지 배경 제거 및 다이어그램 표시 크기 조정

🔍 상세

  • .notification 탭 선택 시 MainView에서 coordinator.fetchData() 호출
  • MainViewCoordinator.fetchData()에서 기존 PushNotificationListViewModel.Action.fetchNotifications 전달
  • PushNotificationListView의 자동 .onAppear fetch 제거
  • 사용자의 명시적 새로고침 경로인 .refreshable 유지

📸 영상 / 이미지 (Optional)

2026-05-29.12.06.45.mov
2026-05-29.12.12.10.mov
개선 전 개선 후

@opficdev opficdev self-assigned this May 28, 2026
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Code Review

이번 풀 request는 메인 탭 전환 시 알림 데이터를 가져오도록 구조를 개선하고 관련 시퀀스 다이어그램을 업데이트했습니다. 기존 PushNotificationListView에서 onAppear 시점에 호출하던 알림 조회 로직을 MainViewMainViewCoordinator가 탭 선택 이벤트를 통해 제어하도록 변경했습니다. 리뷰에서는 MainViewCoordinator에 추가된 fetchData() 메서드가 실제로는 알림 데이터만 가져오므로, 역할과 의도를 명확히 하기 위해 fetchNotifications()로 이름을 변경하고 호출부도 이에 맞추어 수정할 것을 제안했습니다.

Comment thread Application/DevLogPresentation/Sources/Main/MainViewCoordinator.swift Outdated
Comment thread Application/DevLogPresentation/Sources/Main/MainView.swift Outdated
@opficdev opficdev merged commit b04aba5 into develop May 28, 2026
1 check passed
@opficdev opficdev deleted the fix/#488-PushNotificationListViewModel branch May 28, 2026 15:46
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.

PushNotificationListViewModel 생성 및 생명주기를 개선한다

1 participant