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