시그니처 ON/OFF 버튼 추가

This commit is contained in:
Yu Sung
2024-05-02 14:45:54 +09:00
parent 3d625a4fa0
commit 86f0d466fa
4 changed files with 45 additions and 4 deletions

View File

@@ -30,6 +30,7 @@ struct LiveRoomViewV2: View {
isOnBg: viewModel.isBgOn,
isOnNotice: viewModel.isShowNotice,
isOnMenuPan: viewModel.isShowMenuPan,
isOnSignature: viewModel.isSignatureOn,
isShowMenuPanButton: !liveRoomInfo.menuPan.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty,
creatorId: liveRoomInfo.creatorId,
creatorNickname: liveRoomInfo.creatorNickname,
@@ -66,6 +67,9 @@ struct LiveRoomViewV2: View {
},
onClickParticipants: {
viewModel.isShowProfileList = true
},
onClickToggleSignature: {
viewModel.isSignatureOn.toggle()
}
)
} else {
@@ -75,6 +79,7 @@ struct LiveRoomViewV2: View {
isOnBg: viewModel.isBgOn,
isOnNotice: viewModel.isShowNotice,
isOnMenuPan: viewModel.isShowMenuPan,
isOnSignature: viewModel.isSignatureOn,
isShowMenuPanButton: !liveRoomInfo.menuPan.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty,
creatorId: liveRoomInfo.creatorId,
creatorNickname: liveRoomInfo.creatorNickname,
@@ -116,6 +121,9 @@ struct LiveRoomViewV2: View {
},
onClickChangeListener: {
viewModel.setListener()
},
onClickToggleSignature: {
viewModel.isSignatureOn.toggle()
}
)
}
@@ -258,7 +266,7 @@ struct LiveRoomViewV2: View {
}.padding(.bottom, 70)
}
if viewModel.signatureImageUrl.trimmingCharacters(in: .whitespacesAndNewlines).count > 0 {
if viewModel.isSignatureOn && viewModel.signatureImageUrl.trimmingCharacters(in: .whitespacesAndNewlines).count > 0 {
VStack {
Spacer()
@@ -273,7 +281,7 @@ struct LiveRoomViewV2: View {
}
}
if let signature = viewModel.signature {
if let signature = viewModel.signature, viewModel.isSignatureOn {
VStack {
Spacer()