[#488] PushNotificationListViewModel 생성 및 생명주기를 개선한다#500
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
이번 풀 request는 메인 탭 전환 시 알림 데이터를 가져오도록 구조를 개선하고 관련 시퀀스 다이어그램을 업데이트했습니다. 기존 PushNotificationListView에서 onAppear 시점에 호출하던 알림 조회 로직을 MainView 및 MainViewCoordinator가 탭 선택 이벤트를 통해 제어하도록 변경했습니다. 리뷰에서는 MainViewCoordinator에 추가된 fetchData() 메서드가 실제로는 알림 데이터만 가져오므로, 역할과 의도를 명확히 하기 위해 fetchNotifications()로 이름을 변경하고 호출부도 이에 맞추어 수정할 것을 제안했습니다.
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.
🔗 연관된 이슈
🎯 의도
PushNotificationListView의 데이터 fetch 시점을 화면 생명주기 기준에서 메인 탭 선택 상태 기준으로 변경하여 Home, Today, Profile과 동일한 탭 재진입 fetch 정책 적용
📝 작업 내용
📌 요약
PushNotificationListView.onAppear에서MainView의selectedTab변경 감지로 이동MainViewCoordinator.fetchData()추가로 다른 메인 탭 뷰와 동일한 Coordinator 호출 구조 적용DevLog.drawio에 반영🔍 상세
.notification탭 선택 시MainView에서coordinator.fetchData()호출MainViewCoordinator.fetchData()에서 기존PushNotificationListViewModel.Action.fetchNotifications전달PushNotificationListView의 자동.onAppearfetch 제거.refreshable유지📸 영상 / 이미지 (Optional)
2026-05-29.12.06.45.mov
2026-05-29.12.12.10.mov