스피커 요청 버튼 제거

This commit is contained in:
Yu Sung
2023-08-28 23:13:43 +09:00
parent 3916a49e60
commit 88fcbc98f4
3 changed files with 20 additions and 41 deletions

View File

@@ -22,8 +22,6 @@ struct LiveRoomProfilesDialogView: View {
isShowing: Binding<Bool>,
viewModel: LiveRoomViewModel,
roomInfo: GetRoomInfoResponse,
isShowRequestSpeaker: Bool,
onClickRequestSpeaker: @escaping () -> Void,
registerNotification: @escaping () -> Void,
unRegisterNotification: @escaping () -> Void,
onClickProfile: @escaping (Int) -> Void
@@ -32,16 +30,18 @@ struct LiveRoomProfilesDialogView: View {
self.viewModel = viewModel
self.roomInfo = roomInfo
self.profiles.append(
AnyView(
LiveRoomProfileItemTitleView(
title: "스탭",
count: roomInfo.managerList.count,
totalCount: nil
if !roomInfo.managerList.isEmpty {
self.profiles.append(
AnyView(
LiveRoomProfileItemTitleView(
title: "스탭",
count: roomInfo.managerList.count,
totalCount: nil
)
.padding(.vertical, 14)
)
.padding(.vertical, 14)
)
)
}
let isStaff = viewModel.isEqualToStaffId(creatorId: UserDefaults.int(forKey: .userId)) ||
roomInfo.creatorId == UserDefaults.int(forKey: .userId)
@@ -64,16 +64,18 @@ struct LiveRoomProfilesDialogView: View {
)
}
self.profiles.append(
AnyView(
LiveRoomProfileItemTitleView(
title: "스피커",
count: roomInfo.speakerList.count - 1,
totalCount: roomInfo.totalAvailableParticipantsCount
if (roomInfo.speakerList.count - 1) > 0 {
self.profiles.append(
AnyView(
LiveRoomProfileItemTitleView(
title: "스피커",
count: roomInfo.speakerList.count - 1,
totalCount: roomInfo.totalAvailableParticipantsCount
)
.padding(.vertical, 14)
)
.padding(.vertical, 14)
)
)
}
for speaker in roomInfo.speakerList {
if speaker.id == roomInfo.creatorId {
@@ -117,16 +119,6 @@ struct LiveRoomProfilesDialogView: View {
}
}
if isShowRequestSpeaker {
self.profiles.append(
AnyView(
LiveRoomProfileRequestSpeakerView {
onClickRequestSpeaker()
}
)
)
}
self.profiles.append(
AnyView(
LiveRoomProfileItemTitleView(