Skip to content

[Fix] 리뷰 작성 후 리뷰 리스트 화면에 돌아왔을때 방금 쓴 리뷰가 없는 문제를 해결해요#493

Open
HI-JIN2 wants to merge 2 commits intodevelopfrom
fix/review-refresh-after-write
Open

[Fix] 리뷰 작성 후 리뷰 리스트 화면에 돌아왔을때 방금 쓴 리뷰가 없는 문제를 해결해요#493
HI-JIN2 wants to merge 2 commits intodevelopfrom
fix/review-refresh-after-write

Conversation

@HI-JIN2
Copy link
Member

@HI-JIN2 HI-JIN2 commented Mar 5, 2026

Summary

Paging 이전에는 되었었는데 Paging 도입 후 안된 것으로 추정

  • Navigation에서 ReviewListScreen이 백스택에 남아있어서 LaunchedEffect(menuType, id)가 popBackStack 후에 다시 안 돌아가는것이 원인
  • 리뷰 작성 -> 뒤로가기 시점에 “리스트 화면에 새로고침 신호”를 보내고, 리스트가 다시 보일 때 paging refresh + info 재호출하도록 수정

Describe your changes

  • ReviewNav.kt
    • Write 화면에서 나갈 때 previousBackStackEntry.savedStateHandle에 review_list_refresh_nonce 기록
    • List 화면에서 savedStateHandle.getStateFlow(...)로 nonce 감시 + 소비(0으로 리셋)
  • ReviewListScreen.kt

Issue

To reviewers

@HI-JIN2 HI-JIN2 self-assigned this Mar 5, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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는 사용자가 리뷰를 작성하거나 수정한 후 리뷰 목록 화면으로 돌아왔을 때, 방금 작성된 리뷰가 즉시 반영되지 않는 문제를 해결합니다. ReviewListViewModel에서 리뷰 목록 로딩 파라미터를 관리하는 방식을 StateFlow에서 SharedFlow로 전환하여, 동일한 파라미터로 재진입하더라도 항상 새로운 페이징 데이터를 트리거하도록 개선했습니다. 이를 통해 사용자 경험을 향상시키고 데이터 일관성을 보장합니다.

Highlights

  • 리뷰 목록 갱신 로직 개선: _loadParamsMutableStateFlow에서 MutableSharedFlow로 변경하여 리뷰 목록 갱신 로직을 개선했습니다.
  • SharedFlow 설정 변경: SharedFlowreplay = 1BufferOverflow.DROP_OLDEST 설정을 통해 동일한 파라미터로 다시 진입해도 항상 페이징 소스를 새로 생성하도록 변경했습니다.
  • 리뷰 삭제 후 정보 갱신: 리뷰 삭제 후 리뷰 정보를 갱신할 때 _loadParams.replayCache.lastOrNull()을 사용하여 SharedFlow의 마지막 파라미터를 안전하게 가져오도록 수정했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • app/src/main/java/com/eatssu/android/presentation/cafeteria/review/list/ReviewListViewModel.kt
    • _loadParams의 타입을 MutableStateFlow에서 MutableSharedFlow로 변경했습니다.
    • reviewPagingData 흐름에서 filterNotNull() 호출을 제거했습니다.
    • getReview 함수 내에서 _loadParams 업데이트 방식을 tryEmit으로 변경했습니다.
    • 리뷰 삭제 후 정보 갱신 시 _loadParams.replayCache.lastOrNull()을 사용하도록 수정했습니다.
Activity
  • 이 Pull Request에 대한 활동은 아직 없습니다.
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
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

이 PR은 리뷰 목록이 갱신되지 않는 문제를 해결하기 위해 _loadParamsStateFlow에서 SharedFlow로 변경했습니다. 이 변경으로 동일한 파라미터가 전달되더라도 데이터 스트림이 다시 트리거되어 목록이 새로고침됩니다. 코드 변경 사항을 검토했으며, 유지보수성 향상을 위한 작은 제안을 하나 남깁니다.

loadReviewInfo(currentParams.first, currentParams.second)
}
val currentParams = _loadParams.replayCache.lastOrNull()
if (currentParams != null) loadReviewInfo(currentParams.first, currentParams.second)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

가독성과 향후 유지보수성을 위해 if 문에 중괄호 {}를 사용하는 것을 권장합니다. 이렇게 하면 나중에 if 블록에 코드를 추가할 때 발생할 수 있는 실수를 방지할 수 있습니다.

            if (currentParams != null) {
                loadReviewInfo(currentParams.first, currentParams.second)
            }

@HI-JIN2 HI-JIN2 marked this pull request as ready for review March 5, 2026 15:39
@HI-JIN2 HI-JIN2 requested a review from PeraSite March 6, 2026 02: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.

[리뷰] 리뷰 작성후 리스트 뷰로 돌아오면 방금 작성한 리뷰가 보이지 않습니다

1 participant