fix(live-room): 스탭 캡쳐 녹화 보호 예외를 반영한다
This commit is contained in:
@@ -70,8 +70,17 @@ struct LiveRoomViewV2: View {
|
||||
return creatorId == UserDefaults.int(forKey: .userId)
|
||||
}
|
||||
|
||||
private var isCurrentUserStaff: Bool {
|
||||
guard let managerList = viewModel.liveRoomInfo?.managerList else {
|
||||
return false
|
||||
}
|
||||
|
||||
let currentUserId = UserDefaults.int(forKey: .userId)
|
||||
return managerList.contains { $0.id == currentUserId }
|
||||
}
|
||||
|
||||
private var shouldEnforceScreenCaptureProtection: Bool {
|
||||
!isCurrentUserHost
|
||||
!(isCurrentUserHost || isCurrentUserStaff)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
@@ -944,6 +953,9 @@ struct LiveRoomViewV2: View {
|
||||
.onChange(of: viewModel.liveRoomInfo?.creatorId) { _ in
|
||||
syncScreenCaptureProtectionState()
|
||||
}
|
||||
.onChange(of: viewModel.liveRoomInfo?.managerList) { _ in
|
||||
syncScreenCaptureProtectionState()
|
||||
}
|
||||
.onChange(of: viewModel.isChatFrozenForCurrentUser) { isFrozen in
|
||||
if isFrozen {
|
||||
hideKeyboard()
|
||||
|
||||
Reference in New Issue
Block a user