fix(live-room): 스탭 캡쳐 녹화 보호 예외를 반영한다

This commit is contained in:
Yu Sung
2026-03-30 16:58:44 +09:00
parent 8370f1ead1
commit ec7e9cc71c
2 changed files with 50 additions and 1 deletions

View File

@@ -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()