라이브 후원

- 비밀 후원 기능 추가
This commit is contained in:
Yu Sung
2024-08-26 20:07:37 +09:00
parent 81846f7f7b
commit 534a6e737e
9 changed files with 150 additions and 43 deletions

View File

@@ -9,7 +9,7 @@ import Foundation
struct LiveRoomChatRawMessage: Codable {
enum LiveRoomChatRawMessageType: String, Codable {
case DONATION, EDIT_ROOM_INFO, SET_MANAGER, TOGGLE_ROULETTE, ROULETTE_DONATION
case DONATION, SECRET_DONATION, EDIT_ROOM_INFO, SET_MANAGER, TOGGLE_ROULETTE, ROULETTE_DONATION
}
let type: LiveRoomChatRawMessageType

View File

@@ -43,7 +43,7 @@ struct LiveRoomDonationChatItemView: View {
.font(.system(size: 15))
.foregroundColor(Color(hex: "fdca2f"))
Text("을 후원하셨습니다.")
Text(chatMessage.chat.contains("비밀") ? "을 비밀후원하셨습니다.💰🪙" : "을 후원하셨습니다.💰🪙")
.font(.system(size: 15))
.foregroundColor(.white)
}
@@ -58,6 +58,7 @@ struct LiveRoomDonationChatItemView: View {
.padding(13)
.frame(width: screenSize().width - 86, alignment: .leading)
.background(
chatMessage.chat.contains("비밀") ? Color(hex: "333333").opacity(0.8) :
chatMessage.can >= 10000 ? Color(hex: "c25264").opacity(0.8) :
chatMessage.can >= 5000 ? Color(hex: "d85e37").opacity(0.8) :
chatMessage.can >= 1000 ? Color(hex: "d38c38").opacity(0.8) :