feat(live-room): 라이브 캡쳐 녹화 허용 설정을 생성 시청 흐름에 반영한다
This commit is contained in:
@@ -24,4 +24,5 @@ struct CreateLiveRoomRequest: Encodable {
|
||||
var menuPan: String = ""
|
||||
var isActiveMenuPan: Bool = false
|
||||
var isAvailableJoinCreator: Bool = true
|
||||
var isCaptureRecordingAvailable: Bool = false
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@ struct GetRecentRoomInfoResponse: Decodable {
|
||||
let coverImagePath: String
|
||||
let numberOfPeople: Int
|
||||
let genderRestriction: LiveRoomCreateViewModel.GenderRestriction
|
||||
let isCaptureRecordingAvailable: Bool?
|
||||
}
|
||||
|
||||
@@ -182,7 +182,32 @@ struct LiveRoomCreateView: View {
|
||||
}
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
|
||||
VStack(spacing: 13.3) {
|
||||
Text(I18n.CreateLive.captureRecordingSetting)
|
||||
.appFont(size: 16.7, weight: .bold)
|
||||
.foregroundColor(Color.grayee)
|
||||
.frame(width: screenSize().width - 26.7, alignment: .leading)
|
||||
|
||||
HStack(spacing: 13.3) {
|
||||
SelectedButtonView(
|
||||
title: I18n.CreateLive.captureRecordingAllowed,
|
||||
isActive: true,
|
||||
isSelected: viewModel.isCaptureRecordingAvailable
|
||||
)
|
||||
.onTapGesture { viewModel.isCaptureRecordingAvailable = true }
|
||||
|
||||
SelectedButtonView(
|
||||
title: I18n.CreateLive.captureRecordingNotAllowed,
|
||||
isActive: true,
|
||||
isSelected: !viewModel.isCaptureRecordingAvailable
|
||||
)
|
||||
.onTapGesture { viewModel.isCaptureRecordingAvailable = false }
|
||||
}
|
||||
}
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
.padding(.top, 33.3)
|
||||
|
||||
if shouldShowAdultSetting {
|
||||
AdultSettingView()
|
||||
.frame(width: screenSize().width - 26.7)
|
||||
|
||||
@@ -100,6 +100,7 @@ final class LiveRoomCreateViewModel: ObservableObject {
|
||||
@Published var selectedMenu: SelectedMenu? = nil
|
||||
|
||||
@Published var isAvailableJoinCreator = true
|
||||
@Published var isCaptureRecordingAvailable = false
|
||||
|
||||
private let repository = LiveRepository()
|
||||
private var subscription = Set<AnyCancellable>()
|
||||
@@ -146,6 +147,7 @@ final class LiveRoomCreateViewModel: ObservableObject {
|
||||
self.coverImagePath = data.coverImagePath
|
||||
self.numberOfPeople = String(data.numberOfPeople)
|
||||
self.genderRestriction = data.genderRestriction
|
||||
self.isCaptureRecordingAvailable = data.isCaptureRecordingAvailable ?? false
|
||||
|
||||
self.errorMessage = I18n.CreateLive.recentDataLoaded
|
||||
self.isShowPopup = true
|
||||
@@ -192,7 +194,8 @@ final class LiveRoomCreateViewModel: ObservableObject {
|
||||
menuPanId: isActivateMenu ? menuId : 0,
|
||||
menuPan: isActivateMenu ? menu : "",
|
||||
isActiveMenuPan: isActivateMenu,
|
||||
isAvailableJoinCreator: isAvailableJoinCreator
|
||||
isAvailableJoinCreator: isAvailableJoinCreator,
|
||||
isCaptureRecordingAvailable: isCaptureRecordingAvailable
|
||||
)
|
||||
|
||||
if timeSettingMode == .RESERVATION {
|
||||
|
||||
Reference in New Issue
Block a user