feat(live-room): 라이브룸 채팅 삭제 기능 구현
This commit is contained in:
@@ -10,7 +10,9 @@ import SwiftUI
|
||||
struct LiveRoomChatView: View {
|
||||
|
||||
let messages: [LiveRoomChat]
|
||||
let isCreator: Bool
|
||||
let getUserProfile: (Int) -> Void
|
||||
let onLongPressChat: (LiveRoomNormalChat) -> Void
|
||||
|
||||
var body: some View {
|
||||
LazyVStack(alignment: .leading, spacing: 18) {
|
||||
@@ -36,7 +38,8 @@ struct LiveRoomChatView: View {
|
||||
if chatMessage.userId != UserDefaults.int(forKey: .userId) {
|
||||
getUserProfile(chatMessage.userId)
|
||||
}
|
||||
}
|
||||
},
|
||||
onLongPressChat: isCreator ? { onLongPressChat(chatMessage) } : nil
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -49,19 +52,23 @@ struct LiveRoomChatView_Previews: PreviewProvider {
|
||||
LiveRoomChatView(
|
||||
messages: [
|
||||
LiveRoomRouletteDonationChat(
|
||||
memberId: 0,
|
||||
profileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
nickname: "jkljkljkl",
|
||||
rouletteResult: "sdfjkldfsjkl",
|
||||
type: .ROULETTE_DONATION
|
||||
),
|
||||
LiveRoomRouletteDonationChat(
|
||||
memberId: 1,
|
||||
profileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
nickname: "jkljkljkl",
|
||||
rouletteResult: "sdfjkldfsjkl",
|
||||
type: .ROULETTE_DONATION
|
||||
)
|
||||
],
|
||||
getUserProfile: { _ in }
|
||||
isCreator: false,
|
||||
getUserProfile: { _ in },
|
||||
onLongPressChat: { _ in }
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user