Skip to content

fix: 내 피드 필터 설정 시 새로고침#849

Merged
devfeijoa merged 1 commit intodevelopfrom
fix/848
Mar 23, 2026
Merged

fix: 내 피드 필터 설정 시 새로고침#849
devfeijoa merged 1 commit intodevelopfrom
fix/848

Conversation

@devfeijoa
Copy link
Copy Markdown
Contributor

@devfeijoa devfeijoa commented Mar 23, 2026

📌𝘐𝘴𝘴𝘶𝘦𝘴

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

  • 810번 PR에서 머지 되었던 코드가 누락되어 다시 재업

📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵

같은 코드이므로 따로 첨부하지 않았습니다

💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴

Summary by CodeRabbit

버그 수정

  • 피드 필터 적용 시 기존 데이터를 올바르게 유지하도록 개선되었습니다.
  • 필터 적용 후 페이지네이션 상태가 초기화되고 새로운 데이터를 불러올 수 있는 상태로 복원됩니다.

@devfeijoa devfeijoa requested review from Sadturtleman, m6z1 and s9hn March 23, 2026 08:44
@devfeijoa devfeijoa self-assigned this Mar 23, 2026
@devfeijoa devfeijoa added 🔨 [FIX] 버그를 수정합니다. [👸 공주 은영] labels Mar 23, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4b9bc8ac-14ad-488a-b857-248002b6f10d

📥 Commits

Reviewing files that changed from the base of the PR and between b0b081d and 7b6cf79.

📒 Files selected for processing (1)
  • feature/feed/src/main/java/com/into/websoso/feature/feed/FeedViewModel.kt

Walkthrough

FeedViewModel의 applyMyFilter 메서드가 필터 변경 시 전체 myFeedData를 초기화하는 대신, 기존 피드 목록을 유지하면서 페이지네이션 상태와 UI 상태만 업데이트하고 fetchNextPage를 호출하도록 수정되었습니다.

Changes

Cohort / File(s) Summary
피드 필터 상태 관리 개선
feature/feed/src/main/java/com/into/websoso/feature/feed/FeedViewModel.kt
applyMyFilter 메서드에서 필터 변경 시 피드 목록을 유지하고 페이지네이션 상태(lastId=0L, isLoadable=true)와 UI 상태(isRefreshing=true, error=false)만 초기화하도록 수정하여, 필터 결과가 동일한 경우 빈 화면으로 고정되는 문제를 해결합니다.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant UI
    participant ViewModel
    participant Repository
    participant Server
    
    User->>UI: 필터 변경
    UI->>ViewModel: applyMyFilter(filter)
    
    ViewModel->>ViewModel: _uiState 업데이트<br/>(feeds 유지, lastId=0L,<br/>isLoadable=true,<br/>isRefreshing=true)
    ViewModel->>ViewModel: currentFilter 설정
    
    ViewModel->>ViewModel: fetchNextPage(feedId=0L) 호출
    ViewModel->>Repository: 데이터 요청
    
    Repository->>Server: API 호출
    Server-->>Repository: 피드 데이터 반환
    
    Repository->>Repository: StateFlow emit<br/>(데이터 변경 여부 확인)
    
    alt 데이터 변경된 경우
        Repository-->>ViewModel: 새 데이터 emit
        ViewModel->>ViewModel: flows collect<br/>myFeedData 갱신
        ViewModel-->>UI: 상태 업데이트
        UI->>UI: 피드 목록 표시
    else 데이터 동일한 경우
        Repository-->>ViewModel: emit 없음
        UI->>UI: 기존 피드 목록 유지<br/>(빈 화면 방지)
    end
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

Suggested labels

🧙마법사 하루

Suggested reviewers

  • s9hn
  • m6z1
  • Sadturtleman

Poem

🐰 필터를 클릭할 때마다
텅 빈 화면이 보였다네
하지만 이제는 리스트를 지키고
새로운 데이터만 갈아 치우니
피드가 안정적으로 빛나는구나 ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목은 '내 피드 필터 설정 시 새로고침'으로 변경 사항의 핵심(필터 적용 시 피드 새로고침 개선)을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 필수 템플릿의 모든 섹션(Issues, Work Description, Screenshots, To Reviewers)을 포함하고 있으며, 관련 이슈 번호와 작업 내용이 기술되어 있습니다.
Linked Issues check ✅ Passed 코드 변경사항이 #810 이슈의 요구사항을 충족합니다. myFeedData를 초기화하지 않고 feeds를 유지하면서 pagination 상태만 리셋하고 isRefreshing을 활성화하는 방식으로 해결했습니다.
Out of Scope Changes check ✅ Passed 코드 변경이 FeedViewModel의 applyMyFilter 메서드에 한정되어 있으며, 연결된 이슈의 요구사항 범위 내의 필터 적용 로직 개선만 포함하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/848

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@Sadturtleman Sadturtleman left a comment

Choose a reason for hiding this comment

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

LGTM

@devfeijoa devfeijoa merged commit 36c964a into develop Mar 23, 2026
3 checks passed
@devfeijoa devfeijoa deleted the fix/848 branch March 23, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[👸 공주 은영] 🔨 [FIX] 버그를 수정합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: 내 피드 필터 설정 시 새로고침

2 participants