라이브 룸 - 라이브 크리에이터 프로필 영역에 팔로우 버튼 제거
This commit is contained in:
@@ -16,11 +16,7 @@ struct LiveRoomInfoCreatorView: View {
|
||||
|
||||
let isMute: Bool
|
||||
let isAdult: Bool
|
||||
let isFollowing: Bool
|
||||
let isActiveSpeaker: Bool
|
||||
let isShowFollowingButton: Bool
|
||||
|
||||
let onClickFollow: () -> Void
|
||||
let onClickProfile: () -> Void
|
||||
|
||||
var body: some View {
|
||||
@@ -59,17 +55,10 @@ struct LiveRoomInfoCreatorView: View {
|
||||
.foregroundColor(.grayee)
|
||||
.lineLimit(1)
|
||||
|
||||
HStack(spacing: 5.3) {
|
||||
Text(creatorNickname)
|
||||
.appFont(size: 12, weight: .medium)
|
||||
.foregroundColor(.gray77)
|
||||
.lineLimit(1)
|
||||
|
||||
if isShowFollowingButton {
|
||||
Image(isFollowing ? "btn_following" : "btn_follow")
|
||||
.onTapGesture { onClickFollow() }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(8)
|
||||
@@ -89,10 +78,7 @@ struct LiveRoomInfoCreatorView_Previews: PreviewProvider {
|
||||
creatorProfileUrl: "https://cf.sodalive.net/profile/26/26-profile-ddf78b4d-0300-4c50-9c84-5d8a95fd5fe2-4892-1705256364320",
|
||||
isMute: false,
|
||||
isAdult: false,
|
||||
isFollowing: true,
|
||||
isActiveSpeaker: true,
|
||||
isShowFollowingButton: true,
|
||||
onClickFollow: {},
|
||||
onClickProfile: {}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -26,13 +26,11 @@ struct LiveRoomInfoGuestView: View {
|
||||
let muteSpeakerList: [UInt]
|
||||
let activeSpeakerList: [UInt]
|
||||
|
||||
let isFollowing: Bool
|
||||
let isAdult: Bool
|
||||
|
||||
let onClickQuit: () -> Void
|
||||
let onClickToggleBg: () -> Void
|
||||
let onClickShare: () -> Void
|
||||
let onClickFollow: (Bool) -> Void
|
||||
let onClickProfile: (Int) -> Void
|
||||
let onClickNotice: () -> Void
|
||||
let onClickMenuPan: () -> Void
|
||||
@@ -104,10 +102,7 @@ struct LiveRoomInfoGuestView: View {
|
||||
creatorProfileUrl: creatorProfileUrl,
|
||||
isMute: muteSpeakerList.contains(UInt(creatorId)),
|
||||
isAdult: isAdult,
|
||||
isFollowing: isFollowing,
|
||||
isActiveSpeaker: activeSpeakerList.contains(UInt(creatorId)),
|
||||
isShowFollowingButton: true,
|
||||
onClickFollow: { onClickFollow(isFollowing) },
|
||||
onClickProfile: { onClickProfile(creatorId) }
|
||||
)
|
||||
|
||||
@@ -253,12 +248,10 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider {
|
||||
],
|
||||
muteSpeakerList: [],
|
||||
activeSpeakerList: [],
|
||||
isFollowing: false,
|
||||
isAdult: false,
|
||||
onClickQuit: {},
|
||||
onClickToggleBg: {},
|
||||
onClickShare: {},
|
||||
onClickFollow: { _ in },
|
||||
onClickProfile: { _ in },
|
||||
onClickNotice: {},
|
||||
onClickMenuPan: {},
|
||||
|
||||
@@ -102,10 +102,7 @@ struct LiveRoomInfoHostView: View {
|
||||
creatorProfileUrl: creatorProfileUrl,
|
||||
isMute: muteSpeakerList.contains(UInt(creatorId)),
|
||||
isAdult: isAdult,
|
||||
isFollowing: false,
|
||||
isActiveSpeaker: activeSpeakerList.contains(UInt(creatorId)),
|
||||
isShowFollowingButton: false,
|
||||
onClickFollow: {},
|
||||
onClickProfile: {}
|
||||
)
|
||||
|
||||
|
||||
@@ -102,7 +102,6 @@ struct LiveRoomViewV2: View {
|
||||
speakerList: liveRoomInfo.speakerList,
|
||||
muteSpeakerList: viewModel.muteSpeakers,
|
||||
activeSpeakerList: viewModel.activeSpeakers,
|
||||
isFollowing: liveRoomInfo.isFollowing,
|
||||
isAdult: liveRoomInfo.isAdult,
|
||||
onClickQuit: {
|
||||
viewModel.isShowQuitPopup = true
|
||||
@@ -113,13 +112,6 @@ struct LiveRoomViewV2: View {
|
||||
onClickShare: {
|
||||
viewModel.shareRoom()
|
||||
},
|
||||
onClickFollow: {
|
||||
if $0 {
|
||||
viewModel.creatorUnFollow()
|
||||
} else {
|
||||
viewModel.creatorFollow()
|
||||
}
|
||||
},
|
||||
onClickProfile: {
|
||||
if $0 != UserDefaults.int(forKey: .userId) {
|
||||
viewModel.getUserProfile(userId: $0)
|
||||
|
||||
Reference in New Issue
Block a user