fix(community): 유료 미구매 게시물 롱프레스 메뉴 노출을 차단한다

This commit is contained in:
Yu Sung
2026-03-17 11:29:05 +09:00
parent 2b20e7a9a3
commit 37e361b1e9
2 changed files with 16 additions and 0 deletions

View File

@@ -181,6 +181,7 @@ struct CreatorCommunityAllView: View {
} }
} }
.onLongPressGesture(minimumDuration: 0.5) { .onLongPressGesture(minimumDuration: 0.5) {
guard item.price <= 0 || item.existOrdered else { return }
viewModel.openReportMenu(item: item) viewModel.openReportMenu(item: item)
} }
.onAppear { .onAppear {

View File

@@ -0,0 +1,15 @@
# 커뮤니티 그리드 롱프레스 구매 조건 수정
- [x] `CreatorCommunityAllView`의 기존 롱프레스/구매 상태 분기 패턴을 확인한다.
- [x] `gridContentView`에서 유료 미구매 게시물은 롱프레스 보조 메뉴가 열리지 않도록 조건을 추가한다.
- [x] 변경 파일 진단과 빌드/테스트를 실행해 회귀가 없는지 확인한다.
- [x] 검증 결과를 문서 하단 검증 기록에 남긴다.
---
## 검증 기록
- `grep "existOrdered|price\\s*>\\s*0|openReportMenu\\(" SodaLive/Sources`: 커뮤니티 유료/구매 여부 분기 패턴과 보조 메뉴 진입 지점을 확인.
- `lsp_diagnostics` (`SodaLive/Sources/Explorer/Profile/CreatorCommunity/All/CreatorCommunityAllView.swift`): SourceKit 인덱싱 한계로 파일 전역의 기존 심볼 미해결 오류가 다수 표시되었고, 이번 변경 라인(`guard item.price <= 0 || item.existOrdered`) 자체의 신규 오류는 확인되지 않음.
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`: 성공 (`** BUILD SUCCEEDED **`).
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`: 실패 (`Scheme SodaLive is not currently configured for the test action.`)로 스킴 테스트 액션 미구성 상태를 확인.