캔 아이콘 변경
This commit is contained in:
parent
6bc5356ac1
commit
792e029f0d
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 7.7 KiB |
|
@ -70,6 +70,8 @@ struct LiveRoomPasswordDialog: View {
|
|||
.foregroundColor(Color(hex: "ffffff"))
|
||||
|
||||
Image("ic_can")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("으로 입장")
|
||||
.font(.custom(Font.bold.rawValue, size: 15.3))
|
||||
|
|
|
@ -23,6 +23,8 @@ struct LiveRoomDonationChatItemView: View {
|
|||
.cornerRadius(23.3)
|
||||
|
||||
Image("ic_can")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 6.7) {
|
||||
|
|
|
@ -11,6 +11,7 @@ import Kingfisher
|
|||
|
||||
struct LiveRoomTopCreatorView: View {
|
||||
|
||||
let creatorId: Int
|
||||
var nickname: String
|
||||
var profileImageUrl: String
|
||||
var isFollowing: Bool
|
||||
|
@ -34,8 +35,10 @@ struct LiveRoomTopCreatorView: View {
|
|||
|
||||
Spacer()
|
||||
|
||||
Image(isFollowing ? "btn_following" : "btn_follow")
|
||||
.onTapGesture { onClickFollow(isFollowing) }
|
||||
if creatorId != UserDefaults.int(forKey: .userId) {
|
||||
Image(isFollowing ? "btn_following" : "btn_follow")
|
||||
.onTapGesture { onClickFollow(isFollowing) }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ struct LiveRoomView: View {
|
|||
.padding(.horizontal, 13.3)
|
||||
|
||||
LiveRoomTopCreatorView(
|
||||
creatorId: liveRoomInfo.creatorId,
|
||||
nickname: liveRoomInfo.creatorNickname,
|
||||
profileImageUrl: liveRoomInfo.creatorProfileUrl,
|
||||
isFollowing: liveRoomInfo.isFollowing,
|
||||
|
@ -125,9 +126,9 @@ struct LiveRoomView: View {
|
|||
},
|
||||
onClickFollow: {
|
||||
if $0 {
|
||||
viewModel.unRegisterNotification()
|
||||
viewModel.creatorUnFollow()
|
||||
} else {
|
||||
viewModel.registerNotification()
|
||||
viewModel.creatorFollow()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -503,8 +504,8 @@ struct LiveRoomView: View {
|
|||
onClickRequestSpeaker: {
|
||||
viewModel.requestSpeaker()
|
||||
},
|
||||
registerNotification: { viewModel.registerNotification() },
|
||||
unRegisterNotification: { viewModel.unRegisterNotification() },
|
||||
registerNotification: { viewModel.creatorFollow() },
|
||||
unRegisterNotification: { viewModel.creatorUnFollow() },
|
||||
onClickProfile: {
|
||||
if $0 != UserDefaults.int(forKey: .userId) {
|
||||
viewModel.getUserProfile(userId: $0)
|
||||
|
@ -526,8 +527,8 @@ struct LiveRoomView: View {
|
|||
viewModel.setManager(userId: $0)
|
||||
},
|
||||
onClickReleaseManager: { viewModel.changeListener(peerId: $0, isFromManager: true) },
|
||||
onClickFollow: { viewModel.registerNotification(creatorId: $0, isGetUserProfile: true) },
|
||||
onClickUnFollow: { viewModel.unRegisterNotification(creatorId: $0, isGetUserProfile: true) },
|
||||
onClickFollow: { viewModel.creatorFollow(creatorId: $0, isGetUserProfile: true) },
|
||||
onClickUnFollow: { viewModel.creatorUnFollow(creatorId: $0, isGetUserProfile: true) },
|
||||
onClickInviteSpeaker: { inviteSpeaker(peerId: $0) },
|
||||
onClickChangeListener: {
|
||||
viewModel.changeListener(peerId: $0)
|
||||
|
@ -722,7 +723,7 @@ struct LiveRoomView: View {
|
|||
Spacer()
|
||||
|
||||
HStack(spacing: 4.7) {
|
||||
Image("ic_donation_status")
|
||||
Image("ic_can")
|
||||
.resizable()
|
||||
.frame(width: 16, height: 16)
|
||||
|
||||
|
|
|
@ -751,7 +751,7 @@ final class LiveRoomViewModel: NSObject, ObservableObject {
|
|||
.store(in: &subscription)
|
||||
}
|
||||
|
||||
func registerNotification(creatorId: Int? = nil, isGetUserProfile: Bool = false) {
|
||||
func creatorFollow(creatorId: Int? = nil, isGetUserProfile: Bool = false) {
|
||||
var userId = 0
|
||||
|
||||
if let creatorId = creatorId {
|
||||
|
@ -803,7 +803,7 @@ final class LiveRoomViewModel: NSObject, ObservableObject {
|
|||
}
|
||||
}
|
||||
|
||||
func unRegisterNotification(creatorId: Int? = nil, isGetUserProfile: Bool = false) {
|
||||
func creatorUnFollow(creatorId: Int? = nil, isGetUserProfile: Bool = false) {
|
||||
var userId = 0
|
||||
|
||||
if let creatorId = creatorId {
|
||||
|
|
|
@ -20,6 +20,8 @@ struct CanCardView: View {
|
|||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
|
||||
Image("ic_can")
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Image("ic_forward")
|
||||
.resizable()
|
||||
|
|
Loading…
Reference in New Issue