feat(home): 팔로잉 최근 대화를 연결한다
This commit is contained in:
@@ -252,7 +252,7 @@
|
||||
|
||||
### Phase 6: 최근 대화 섹션
|
||||
|
||||
- [ ] **Task 6.1: 최근 대화 섹션 생성**
|
||||
- [x] **Task 6.1: 최근 대화 섹션 생성**
|
||||
- 대상 파일:
|
||||
- 생성: `SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingChatSection.swift`
|
||||
- 확인: `SodaLive/Sources/Chat/Talk/TalkView.swift`
|
||||
@@ -261,14 +261,14 @@
|
||||
- `recentChats`가 비어 있으면 parent에서 섹션을 렌더링하지 않는다.
|
||||
- 섹션 타이틀은 `I18n.HomeFollowing.recentChatTitle`을 사용한다.
|
||||
- 각 item은 `targetImageUrl`, `targetName`, `lastMessage`, `lastMessageAt`을 표시한다.
|
||||
- `chatType`은 현재 PRD에서 노출 요구가 없으므로 표시하지 않는다.
|
||||
- `chatType == "DM"`이면 `Direct` 태그를 표시한다.
|
||||
- `lastMessageAt`은 UTC 기준 문자열로 받아 상대 시간 또는 기존 Talk item과 맞는 시간 label로 표시한다.
|
||||
- item 탭 시 `onTapChatRoom(roomId)`를 호출한다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `rg "struct MainHomeFollowingChatSection|recentChatTitle|ChatRoomListItemResponse|targetImageUrl|targetName|lastMessage|lastMessageAt|onTapChatRoom" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingChatSection.swift`
|
||||
- 기대 결과: 최근 대화 item 필드와 채팅방 tap callback이 확인된다.
|
||||
- 실행 명령: `rg "struct MainHomeFollowingChatSection|recentChatTitle|ChatRoomListItemResponse|targetImageUrl|targetName|lastMessage|lastMessageAt|chatType == \"DM\"|Direct|onTapChatRoom" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingChatSection.swift`
|
||||
- 기대 결과: 최근 대화 item 필드, `Direct` 태그 조건, 채팅방 tap callback이 확인된다.
|
||||
|
||||
- [ ] **Task 6.2: 채팅방 진입 연결**
|
||||
- [x] **Task 6.2: 채팅방 진입 연결**
|
||||
- 대상 파일:
|
||||
- 수정: `SodaLive/Sources/V2/Main/Home/MainHomeView.swift`
|
||||
- 수정: `SodaLive/Sources/V2/Main/MainView.swift`
|
||||
@@ -519,3 +519,11 @@
|
||||
- 2026-07-01: `rg "CGSize\(width: 75, height: 75\)|Color\(hex: \"62CFFF\"\)|Text\(\"LIVE\"\)|frame\(height: 18\)|padding\(\.trailing, 22\)|padding\(\.leading, SodaSpacing\.s14\)|spacing: SodaSpacing\.s8|appFont\(size: 18, weight: \.bold\)|appFont\(size: 14, weight: \.regular\)" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingLiveSection.swift`로 Figma 핵심 수치 반영을 확인했다.
|
||||
- 2026-07-01: `rg "localhost:3845|img_live|frame\(width: 50, height: 18\)|CGSize\(width: 62, height: 62\)|RoundedRectangle" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingLiveSection.swift` 결과가 없어 Figma localhost asset 미사용과 기존 배지/카드 형태 제거를 확인했다.
|
||||
- 2026-07-01: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`를 실행해 Figma 반영 후 빌드 성공을 확인했다. 기존 Crashlytics dSYM/AppIntents warning은 남아 있으나 컴파일 오류는 없었다.
|
||||
- 2026-07-01: Phase 6 구현을 진행해 `MainHomeFollowingChatSection`을 추가하고, `recentChats`를 Figma `24:5698`, `24:5701` 기준의 가로 카드 섹션으로 표시하도록 조립했다. `chatType == "DM"`일 때만 `Direct` 태그를 표시하고, `lastMessageAt`은 `DateParser.relativeTimeText(fromUTC:fallback:now:)`로 표시한다.
|
||||
- 2026-07-01: `MainHomeFollowingView -> MainHomeView -> MainView.handleFollowingChatRoomTap(roomId:)` 경로로 최근 대화 item tap을 `.chatRoom(id:)` 라우팅에 연결했다.
|
||||
- 2026-07-01: `SodaLive.xcodeproj/project.pbxproj`에 `MainHomeFollowingChatSection.swift` 파일 참조와 Sources build file을 추가해 Xcode navigator와 target compile sources에서 바로 확인 가능하도록 등록했다.
|
||||
- 2026-07-01: `rg "struct MainHomeFollowingChatSection|recentChatTitle|ChatRoomListItemResponse|targetImageUrl|targetName|lastMessage|lastMessageAt|DateParser|onTapChatRoom|ScrollView\(\.horizontal|Color\.gray900|frame\(width: 288|CGSize\(width: 64, height: 64\)|chatType == \"DM\"|Direct" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingChatSection.swift`로 최근 대화 섹션 핵심 요구사항과 Direct 태그 표시 조건을 확인했다.
|
||||
- 2026-07-01: `rg "onTapChatRoom|MainHomeFollowingChatSection|response\?\.recentChats|chatRoom\(id:|ChatRoomView" SodaLive/Sources/V2/Main/Home/Following/MainHomeFollowingView.swift SodaLive/Sources/V2/Main/Home/MainHomeView.swift SodaLive/Sources/V2/Main/MainView.swift SodaLive/Sources/App/AppStep.swift SodaLive/Sources/ContentView.swift`로 최근 대화 섹션 조립과 채팅방 라우팅 연결을 확인했다.
|
||||
- 2026-07-01: `rg "MainHomeFollowingChatSection.swift|MainHomeFollowingChatSection.swift in Sources" SodaLive.xcodeproj/project.pbxproj`로 신규 Swift 파일의 Xcode 프로젝트 등록을 확인했다.
|
||||
- 2026-07-01: `if rg "localhost:3845|unread" SodaLive/Sources/V2/Main/Home/Following/Components/MainHomeFollowingChatSection.swift; then exit 1; else true; fi`를 실행해 Figma localhost asset과 별도 unread 표시가 들어가지 않았음을 확인했다.
|
||||
- 2026-07-01: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`를 실행해 Phase 6 구현 후 빌드 성공을 확인했다. 기존 duplicate build file/Crashlytics dSYM/AppIntents warning은 남아 있으나 컴파일 오류는 없었다.
|
||||
|
||||
Reference in New Issue
Block a user