fix: 앱 재시작 시 포토 리포트 편집/세모피드 공개 상태가 사라지던 문제 수정 - #210
Open
peisonger wants to merge 1 commit into
Open
Conversation
포토 리포트의 사진·템플릿 선택 상태가 인메모리 변수(photo-report-state.ts)에만 저장되고, 세모피드 게시/공개 여부도 서버 조회 없이 로컬 React Query 캐시에만 있어 앱을 종료했다 재진입하면 모두 초기화됐음. 둘 다 AsyncStorage에 저장해 같은 기기에서는 앱 재시작 후에도 복원되도록 수정. 다른 기기/재설치 시에는 여전히 복원 안 됨 — 백엔드에 hikingRecord ↔ semoFeed 연결 조회 API가 없어 서버의 실제 공개 상태를 다시 조회할 방법이 없기 때문. 근본 해결은 백엔드 API 추가가 필요함.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 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. Comment |
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.
Summary
photo-report-state.ts가 일반 모듈 변수였음["record-semofeed", ...]쿼리 키에 실제 서버 조회(queryFn) 없이 로컬에서setQueryData로만 채워지던 캐시였음 — 서버 상태 자체는 정상이어도 앱 재시작 후 다시 불러올 방법이 없었음Changes
features/photo-report/photo-report-state.ts: 인메모리 → AsyncStorage 기반으로 전환features/home/record-semofeed-storage.ts(신규): 기록별 세모피드 id/공개여부를 AsyncStorage에 저장·조회app/record/[id].tsx,app/record/photo-report-edit.tsx: 위 저장소 연동, 관련 호출부 async 처리한계 (백엔드 협의 필요)
같은 기기에서 앱만 재시작하는 흔한 케이스는 해결되지만, 다른 기기/재설치 시에는 여전히 복원되지 않음.
GET /api/hiking-records/{id}응답과SemoFeedResponse어디에도 둘을 연결하는 필드가 없어서, 서버에 실제로 이미 게시된 세모피드가 있는지 조회할 API 자체가 없기 때문. 근본 해결에는 백엔드 API 추가가 필요함.Test plan