Skip to content

Commit dbbb34d

Browse files
committed
Remove dead code in screencap manager
1 parent 0799df0 commit dbbb34d

2 files changed

Lines changed: 3 additions & 40 deletions

File tree

SnapSafe/ScreenCaptureManager.swift

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ class ScreenCaptureManager: ObservableObject {
8585
self?.screenshotTaken = false
8686
}
8787
}
88-
89-
// Here you could also log the security event, show a warning, etc.
9088
}
9189

9290
/// Stop monitoring when the manager is deallocated
@@ -161,32 +159,6 @@ struct ScreenRecordingBlockerView: View {
161159
}
162160
}
163161

164-
// View shown when a screenshot is taken
165-
//struct ScreenshotTakenView: View {
166-
// var body: some View {
167-
// VStack {
168-
// HStack(spacing: 15) {
169-
// Image(systemName: "exclamationmark.triangle.fill")
170-
// .foregroundColor(.yellow)
171-
// .font(.system(size: 24))
172-
//
173-
// Text("Screenshot Captured")
174-
// .font(.system(size: 16, weight: .semibold))
175-
// .foregroundColor(.white)
176-
//
177-
// Spacer()
178-
// }
179-
// .padding()
180-
// .background(Color.black.opacity(0.8))
181-
// .cornerRadius(10)
182-
// .padding(.horizontal)
183-
// .padding(.top, 10)
184-
//
185-
// Spacer()
186-
// }
187-
// }
188-
//}
189-
190162
// Extension to make the modifier easier to use
191163
extension View {
192164
/// Apply protection against screen recording and detect screenshots

SnapSafe/Screens/SecurityOverlayViewModel.swift

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ public enum SecurityOverlayState {
3434
final class SecurityOverlayViewModel: ObservableObject {
3535
// MARK: - Published Properties
3636

37-
@Published public var currentOverlayState: SecurityOverlayState = .normal
38-
@Published public var dismissAllSheets: Bool = false
39-
@Published public var dismissAllAlerts: Bool = false
37+
@Published var currentOverlayState: SecurityOverlayState = .normal
38+
@Published var dismissAllSheets: Bool = false
39+
@Published var dismissAllAlerts: Bool = false
4040

4141
// MARK: - Private Properties
4242

@@ -105,15 +105,6 @@ final class SecurityOverlayViewModel: ObservableObject {
105105
await updateOverlayState()
106106
}
107107

108-
func resetState() async {
109-
dismissAllSheets = false
110-
dismissAllAlerts = false
111-
wasInBackground = false
112-
needsAuthenticationAfterBackground = false
113-
isInactive = false
114-
await updateOverlayState()
115-
}
116-
117108
// MARK: - Private Methods
118109

119110
private func setupObservers() {

0 commit comments

Comments
 (0)