라이브 정보 수정
- 연령 제한 설정 추가
This commit is contained in:
@@ -151,16 +151,18 @@ struct LiveRoomViewV2: View {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
scrollObservableView
|
||||
|
||||
LiveRoomChatView(messages: viewModel.messages) {
|
||||
if $0 != UserDefaults.int(forKey: .userId) {
|
||||
viewModel.getUserProfile(userId: $0)
|
||||
if !viewModel.changeIsAdult || UserDefaults.bool(forKey: .auth) {
|
||||
LiveRoomChatView(messages: viewModel.messages) {
|
||||
if $0 != UserDefaults.int(forKey: .userId) {
|
||||
viewModel.getUserProfile(userId: $0)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(width: screenSize().width)
|
||||
.rotationEffect(Angle(degrees: 180))
|
||||
.valueChanged(value: viewModel.messageChangeFlag) { _ in
|
||||
if viewModel.offset - viewModel.originOffset > (56.7 * 2) {
|
||||
viewModel.isShowingNewChat = true
|
||||
.frame(width: screenSize().width)
|
||||
.rotationEffect(Angle(degrees: 180))
|
||||
.valueChanged(value: viewModel.messageChangeFlag) { _ in
|
||||
if viewModel.offset - viewModel.originOffset > (56.7 * 2) {
|
||||
viewModel.isShowingNewChat = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -398,6 +400,17 @@ struct LiveRoomViewV2: View {
|
||||
}
|
||||
}
|
||||
|
||||
if viewModel.changeIsAdult && !UserDefaults.bool(forKey: .auth) {
|
||||
SodaDialog(
|
||||
title: "알림",
|
||||
desc: "지금 참여하던 라이브는 '19세 이상' 연령제한이 설정되어 정보통신망 이용촉진 및 정보 보호 등에 관한 법률 및 청소년 보호법의 규정에 의해 만 19세 미만의 청소년은 이용할 수 없습니다.\n마이페이지에서 본인인증 후 다시 이용하시기 바랍니다.",
|
||||
confirmButtonTitle: "확인",
|
||||
confirmButtonAction: {
|
||||
viewModel.quitRoom()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
if viewModel.isShowQuitPopup {
|
||||
SodaDialog(
|
||||
title: "라이브 나가기",
|
||||
@@ -646,15 +659,17 @@ struct LiveRoomViewV2: View {
|
||||
isShowing: $viewModel.isShowEditRoomInfoDialog,
|
||||
isShowPhotoPicker: $viewModel.isShowPhotoPicker,
|
||||
viewModel: viewModel,
|
||||
isAdult: liveRoomInfo.isAdult,
|
||||
isLoading: viewModel.isLoading,
|
||||
currentTitle: liveRoomInfo.title,
|
||||
currentNotice: liveRoomInfo.notice,
|
||||
coverImageUrl: liveRoomInfo.coverImageUrl,
|
||||
coverImage: viewModel.coverImage
|
||||
) { newTitle, newNotice in
|
||||
) { newTitle, newNotice, isAdult in
|
||||
self.viewModel.editLiveRoomInfo(
|
||||
title: newTitle,
|
||||
notice: newNotice
|
||||
notice: newNotice,
|
||||
isAdult: isAdult
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user