fix(chat): Direct 대화방 진입을 분기한다
This commit is contained in:
@@ -263,7 +263,7 @@
|
||||
- 각 item은 `targetImageUrl`, `targetName`, `lastMessage`, `lastMessageAt`을 표시한다.
|
||||
- `chatType == "DM"`이면 `Direct` 태그를 표시한다.
|
||||
- `lastMessageAt`은 UTC 기준 문자열로 받아 상대 시간 또는 기존 Talk item과 맞는 시간 label로 표시한다.
|
||||
- item 탭 시 `onTapChatRoom(roomId)`를 호출한다.
|
||||
- item 탭 시 `onTapChatRoom(roomId, chatType)`를 호출한다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `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이 확인된다.
|
||||
@@ -275,12 +275,13 @@
|
||||
- 확인: `SodaLive/Sources/App/AppStep.swift`
|
||||
- 확인: `SodaLive/Sources/ContentView.swift`
|
||||
- 작업 내용:
|
||||
- `MainHomeView`에 `onTapChatRoom: (Int) -> Void` callback을 추가한다.
|
||||
- `MainHomeView`에 `onTapChatRoom: (Int, String) -> Void` callback을 추가한다.
|
||||
- `MainHomeFollowingView`까지 callback을 전달한다.
|
||||
- `MainView`에서 `onTapChatRoom`을 `AppState.shared.setAppStep(step: .chatRoom(id: roomId))`로 구현한다.
|
||||
- `MainView`에서 `chatType == "DM"`이면 `AppState.shared.setAppStep(step: .userCreatorChatRoom(roomId: roomId))`로 구현한다.
|
||||
- `MainView`에서 Direct가 아니면 기존처럼 `AppState.shared.setAppStep(step: .chatRoom(id: roomId))`로 구현한다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `rg "onTapChatRoom|chatRoom\\(id:|ChatRoomView" SodaLive/Sources/V2/Main/Home/MainHomeView.swift SodaLive/Sources/V2/Main/MainView.swift SodaLive/Sources/App/AppStep.swift SodaLive/Sources/ContentView.swift`
|
||||
- 기대 결과: 최근 대화 item tap이 기존 채팅방 화면으로 연결된다.
|
||||
- 기대 결과: 최근 대화 Direct item tap은 `UserCreatorChatRoomView`, Direct가 아닌 item tap은 기존 채팅방 화면으로 연결된다.
|
||||
|
||||
### Phase 7: 이달의 스케줄 섹션
|
||||
|
||||
|
||||
Reference in New Issue
Block a user