From ee398e69a44142ec213646640a506c630d1d1f73 Mon Sep 17 00:00:00 2001 From: Bill Booth Date: Sat, 18 Oct 2025 11:10:42 -0700 Subject: [PATCH] Add securitymanaged to views This was removed for some reason recently. We need this to be here so these views are obscured when the app is in the task switcher/background. --- SnapSafe/Screens/ContentView.swift | 2 ++ SnapSafe/Screens/Gallery/SecureGalleryView.swift | 3 +++ SnapSafe/Screens/PhotoDetail/EnhancedPhotoDetailView.swift | 1 + SnapSafe/Screens/PhotoDetail/PhotoDetailView.swift | 1 + SnapSafe/Screens/Settings/SettingsView.swift | 1 + 5 files changed, 8 insertions(+) diff --git a/SnapSafe/Screens/ContentView.swift b/SnapSafe/Screens/ContentView.swift index a956c8e..0ac5592 100644 --- a/SnapSafe/Screens/ContentView.swift +++ b/SnapSafe/Screens/ContentView.swift @@ -36,9 +36,11 @@ struct ContentView: View { } .sheet(item: $nav.presentedSheet) { destination in navigationDestinationView(for: destination) + .securityManaged() } .fullScreenCover(item: $nav.presentedFullScreenCover) { destination in navigationDestinationView(for: destination) + .securityManaged() } .securityManaged() .onAppear { diff --git a/SnapSafe/Screens/Gallery/SecureGalleryView.swift b/SnapSafe/Screens/Gallery/SecureGalleryView.swift index 4428726..991ff06 100644 --- a/SnapSafe/Screens/Gallery/SecureGalleryView.swift +++ b/SnapSafe/Screens/Gallery/SecureGalleryView.swift @@ -195,6 +195,7 @@ struct SecureGalleryView: View { viewModel.onSelectedPhotoChange(newValue) } .fullScreenCover(item: $viewModel.selectedPhoto) { photoDef in + Group { // Find the index of the selected photo in the photos array if let initialIndex = viewModel.photos.firstIndex(where: { $0.photoName == photoDef.photoName }) { EnhancedPhotoDetailView( @@ -216,6 +217,8 @@ struct SecureGalleryView: View { ) } } + .securityManaged() + } .alert( viewModel.deleteAlertTitle, isPresented: $viewModel.showDeleteConfirmation, diff --git a/SnapSafe/Screens/PhotoDetail/EnhancedPhotoDetailView.swift b/SnapSafe/Screens/PhotoDetail/EnhancedPhotoDetailView.swift index 983f43f..eea6e17 100644 --- a/SnapSafe/Screens/PhotoDetail/EnhancedPhotoDetailView.swift +++ b/SnapSafe/Screens/PhotoDetail/EnhancedPhotoDetailView.swift @@ -176,6 +176,7 @@ struct EnhancedPhotoDetailView: View { .sheet(isPresented: $viewModel.showImageInfo) { if let photoDef = viewModel.currentPhotoDef { ImageInfoView(photoDef: photoDef) + .securityManaged() } } } diff --git a/SnapSafe/Screens/PhotoDetail/PhotoDetailView.swift b/SnapSafe/Screens/PhotoDetail/PhotoDetailView.swift index 417d2cb..474a500 100644 --- a/SnapSafe/Screens/PhotoDetail/PhotoDetailView.swift +++ b/SnapSafe/Screens/PhotoDetail/PhotoDetailView.swift @@ -102,6 +102,7 @@ struct PhotoDetailView: View { .sheet(isPresented: $viewModel.showImageInfo) { if let photoDef = viewModel.currentPhotoDef { ImageInfoView(photoDef: photoDef) + .securityManaged() } } .onAppear { diff --git a/SnapSafe/Screens/Settings/SettingsView.swift b/SnapSafe/Screens/Settings/SettingsView.swift index 450e2fa..6988fcf 100644 --- a/SnapSafe/Screens/Settings/SettingsView.swift +++ b/SnapSafe/Screens/Settings/SettingsView.swift @@ -208,6 +208,7 @@ struct SettingsView: View { viewModel.stopSelectingDecoys() }) } + .securityManaged() } } }