Skip to content

[#136] PushNotificationListView에서 row를 탭하면 푸시알람 데이터가 읽은 상태로 되도록 구현한다#140

Merged
opficdev merged 3 commits intodevelopfrom
feat/#136-PushNotification-row-tab
Feb 26, 2026
Merged

[#136] PushNotificationListView에서 row를 탭하면 푸시알람 데이터가 읽은 상태로 되도록 구현한다#140
opficdev merged 3 commits intodevelopfrom
feat/#136-PushNotification-row-tab

Conversation

@opficdev
Copy link
Owner

@opficdev opficdev self-assigned this Feb 26, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @opficdev, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 푸시 알림 관련 ViewModel과 View의 이름을 변경하여 코드의 가독성과 유지보수성을 향상시키고, 사용자가 목록에서 알림을 탭할 때 해당 알림이 자동으로 읽음 처리되도록 기능을 추가합니다. 이는 사용자 경험을 개선하고 알림 관리의 효율성을 높이는 데 기여합니다.

Highlights

  • ViewModel 및 View 이름 변경: PushNotificationViewModelPushNotificationListViewModel로, PushNotificationViewPushNotificationListView로 이름을 변경하여 코드의 가독성과 역할을 명확히 했습니다.
  • 푸시 알림 읽음 처리 기능 추가: PushNotificationListViewModel에 사용자가 푸시 알림 목록의 항목을 탭할 때 해당 알림을 '읽음' 상태로 표시하는 로직을 추가했습니다.
Changelog
  • DevLog/Presentation/ViewModel/PushNotificationListViewModel.swift
    • ViewModel 클래스 및 파일 이름을 변경했습니다.
    • 알림 탭 시 읽음 상태로 전환하는 로직을 추가했습니다.
  • DevLog/UI/Common/MainView.swift
    • PushNotificationListViewPushNotificationListViewModel을 사용하도록 업데이트했습니다.
  • DevLog/UI/PushNotification/PushNotificationListView.swift
    • View 구조체 및 파일 이름을 변경했습니다.
Activity
  • 이 Pull Request는 이슈 #136을 해결합니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@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

이번 PR은 푸시 알림 목록에서 알림을 탭했을 때 '읽음' 상태로 처리하는 기능을 구현하셨네요. 파일과 클래스 이름을 PushNotificationListViewPushNotificationListViewModel로 변경하여 명확성을 높인 점이 좋습니다.

한 가지 개선점을 제안합니다. 현재 구현에서는 이미 읽은 알림을 탭했을 때 상세 화면으로 이동하지 않는 문제가 있습니다. 사용자는 알림의 읽음 상태와 무관하게 내용을 확인하고 싶을 수 있으므로, 탭할 때 항상 상세 화면으로 이동하도록 수정하는 것이 좋겠습니다. 자세한 내용은 코드 리뷰 댓글을 참고해주세요.

Comment on lines 201 to 205
if let index = state.notifications.firstIndex(where: { $0.id == item.id }), !item.isRead {
state.selectedTodoID = TodoIDItem(id: item.todoID)
state.notifications[index].isRead.toggle()
return [.toggleRead(item.todoID)]
}

Choose a reason for hiding this comment

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

high

현재 구현에서는 이미 읽은 알림을 탭하면 아무 동작도 하지 않습니다. 사용자가 알림을 탭하는 것은 읽음 상태와 관계없이 관련 내용을 확인하려는 의도일 가능성이 높으므로, 항상 상세 화면으로 이동하도록 하는 것이 좋습니다.

또한, item.isRead를 확인하는 대신 state.notifications[index].isRead를 확인하여 상태의 일관성을 보장하는 것이 더 안전합니다. item은 View가 생성될 때의 스냅샷일 수 있기 때문입니다.

따라서 알림을 탭하면 항상 selectedTodoID를 설정하여 화면 이동을 트리거하고, 해당 알림이 아직 읽지 않은 상태일 경우에만 읽음으로 처리하도록 수정하는 것을 제안합니다.

Suggested change
if let index = state.notifications.firstIndex(where: { $0.id == item.id }), !item.isRead {
state.selectedTodoID = TodoIDItem(id: item.todoID)
state.notifications[index].isRead.toggle()
return [.toggleRead(item.todoID)]
}
state.selectedTodoID = TodoIDItem(id: item.todoID)
if let index = state.notifications.firstIndex(where: { $0.id == item.id }) {
if !state.notifications[index].isRead {
state.notifications[index].isRead = true
return [.toggleRead(item.todoID)]
}
}

@opficdev opficdev merged commit abe96d8 into develop Feb 26, 2026
1 check passed
@opficdev opficdev deleted the feat/#136-PushNotification-row-tab branch February 26, 2026 15:15
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.

PushNotificationView에서 row를 탭 하면 읽지 않은 경우 읽은 상태로 파란 점을 보이지 않게 한다

1 participant