diff --git a/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift b/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift index f84dac8e2..3d53a4536 100644 --- a/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift +++ b/Sources/SmileID/Classes/DocumentVerification/View/OrchestratedDocumentVerificationScreen.swift @@ -167,7 +167,6 @@ private struct IOrchestratedDocumentVerificationScreen: View { // imageCaptureDelegate is just for image capture, not job result imageCaptureDelegate: viewModel ), - showBackButton: false, delegate: nil ) case .processing(let state): diff --git a/Sources/SmileID/Classes/SelfieCapture/View/SelfieCaptureView.swift b/Sources/SmileID/Classes/SelfieCapture/View/SelfieCaptureView.swift index 2416c1010..4d3b74057 100644 --- a/Sources/SmileID/Classes/SelfieCapture/View/SelfieCaptureView.swift +++ b/Sources/SmileID/Classes/SelfieCapture/View/SelfieCaptureView.swift @@ -7,21 +7,20 @@ public struct SelfieCaptureView: View, SelfieViewDelegate { @EnvironmentObject var router: Router @ObservedObject var viewModel: SelfieCaptureViewModel private var delegate: SmartSelfieResultDelegate? + private var originalBrightness: CGFloat var camera: CameraView? let arView: ARView? let faceOverlay: FaceOverlayView - let showBackButton: Bool init( viewModel: SelfieCaptureViewModel, - showBackButton: Bool = true, delegate: SmartSelfieResultDelegate? ) { self.delegate = delegate self.viewModel = viewModel - self.showBackButton = showBackButton faceOverlay = FaceOverlayView(model: viewModel) viewModel.smartSelfieResultDelegate = delegate + originalBrightness = UIScreen.main.brightness UIScreen.main.brightness = 1 if ARFaceTrackingConfiguration.isSupported { arView = ARView() @@ -86,20 +85,10 @@ public struct SelfieCaptureView: View, SelfieViewDelegate { Color.clear } } - .overlay(ZStack { - if showBackButton { - NavigationBar { - viewModel.resetState() - viewModel.pauseCameraSession() - router.pop() - } - } - }) } - .edgesIgnoringSafeArea(.all) - .navigationBarBackButtonHidden(true) .background(SmileID.theme.backgroundMain) .onDisappear { + UIScreen.main.brightness = originalBrightness viewModel.cameraManager.pauseSession() } } diff --git a/Sources/SmileID/Classes/SelfieCapture/View/SmartSelfieInstructionsView.swift b/Sources/SmileID/Classes/SelfieCapture/View/SmartSelfieInstructionsView.swift index 93c03b744..d839bda94 100644 --- a/Sources/SmileID/Classes/SelfieCapture/View/SmartSelfieInstructionsView.swift +++ b/Sources/SmileID/Classes/SelfieCapture/View/SmartSelfieInstructionsView.swift @@ -62,11 +62,5 @@ public struct SmartSelfieInstructionsView: View { ) .padding(.top, 50) } - .overlay( - NavigationBar { - viewModel.handleClose() - router.dismiss() - } - ) } }