feat(live): 라이브룸 게스트 상단에 팔로우 버튼과 알림 옵션을 추가한다
This commit is contained in:
@@ -24,6 +24,7 @@ struct LiveRoomInfoGuestView: View {
|
||||
let creatorId: Int
|
||||
let creatorNickname: String
|
||||
let creatorProfileUrl: String
|
||||
let followButtonType: FollowButtonImageType
|
||||
let speakerList: [LiveRoomMember]
|
||||
let muteSpeakerList: [UInt]
|
||||
let activeSpeakerList: [UInt]
|
||||
@@ -38,6 +39,7 @@ struct LiveRoomInfoGuestView: View {
|
||||
let onClickMenuPan: () -> Void
|
||||
let onClickTotalHeart: () -> Void
|
||||
let onClickTotalDonation: () -> Void
|
||||
let onClickFollow: () -> Void
|
||||
let onClickChangeListener: () -> Void
|
||||
let onClickToggleV2VCaption: () -> Void
|
||||
let onClickToggleSignature: () -> Void
|
||||
@@ -210,6 +212,13 @@ struct LiveRoomInfoGuestView: View {
|
||||
.stroke(Color.graybb, lineWidth: 1)
|
||||
)
|
||||
.onTapGesture { onClickTotalDonation() }
|
||||
|
||||
if creatorId != UserDefaults.int(forKey: .userId) {
|
||||
let asset = FollowButtonImageAsset(type: followButtonType)
|
||||
asset.imageView(defaultSize: CGSize(width: 83.3, height: 26.7))
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture { onClickFollow() }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,6 +254,7 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
creatorId: 1,
|
||||
creatorNickname: "도화",
|
||||
creatorProfileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
followButtonType: .follow,
|
||||
speakerList: [
|
||||
LiveRoomMember(
|
||||
id: 1,
|
||||
@@ -276,6 +286,7 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
onClickMenuPan: {},
|
||||
onClickTotalHeart: {},
|
||||
onClickTotalDonation: {},
|
||||
onClickFollow: {},
|
||||
onClickChangeListener: {},
|
||||
onClickToggleV2VCaption: {},
|
||||
onClickToggleSignature: {}
|
||||
|
||||
Reference in New Issue
Block a user