From 8f4168e98baffc3513f894e6b5014f63b96f1dd3 Mon Sep 17 00:00:00 2001 From: Valentina Iancu Date: Mon, 15 Apr 2024 17:58:14 +0200 Subject: [PATCH] refactor(GiniCaptureSDK): Fix indentation PP-392 --- .../GiniScreenAPICoordinator+Analysis.swift | 19 +++++++++++-------- .../GiniScreenAPICoordinator+Camera.swift | 5 ++--- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Analysis.swift b/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Analysis.swift index f3bddb4f7..5583aa3e1 100644 --- a/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Analysis.swift +++ b/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Analysis.swift @@ -107,7 +107,8 @@ extension GiniScreenAPICoordinator: AnalysisDelegate { } else { self?.screenAPINavigationController.dismiss(animated: animated) } - }, cancelPressed: { [weak self] in + }, + cancelPressed: { [weak self] in self?.closeScreenApi() }) } else { @@ -118,7 +119,8 @@ extension GiniScreenAPICoordinator: AnalysisDelegate { } else { self?.screenAPINavigationController.dismiss(animated: animated) } - }, cancelPressed: { [weak self] in + }, + cancelPressed: { [weak self] in self?.closeScreenApi() }) } @@ -126,17 +128,18 @@ extension GiniScreenAPICoordinator: AnalysisDelegate { viewModel = BottomButtonsViewModel( manuallyPressed: { [weak self] in self?.screenAPINavigationController.dismiss(animated: true) - }, cancelPressed: { [weak self] in + }, + cancelPressed: { [weak self] in self?.closeScreenApi() }) } self.trackingDelegate?.onAnalysisScreenEvent(event: Event(type: .error)) - let viewController = ErrorScreenViewController( - giniConfiguration: giniConfiguration, - type: errorType, - documentType: pages.type ?? .pdf, - viewModel: viewModel) + let viewController = ErrorScreenViewController(giniConfiguration: giniConfiguration, + type: errorType, + documentType: pages.type ?? .pdf, + viewModel: viewModel, + errorAnalytics: ErrorAnalytics(type: "")) screenAPINavigationController.pushViewController(viewController, animated: animated) } diff --git a/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Camera.swift b/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Camera.swift index 6825cdc5d..96712c80d 100644 --- a/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Camera.swift +++ b/CaptureSDK/GiniCaptureSDK/Sources/GiniCaptureSDK/Core/Screens/Screen API Coordinator/GiniScreenAPICoordinator+Camera.swift @@ -335,9 +335,8 @@ extension GiniScreenAPICoordinator: UploadDelegate { guard let self = self else { return } self.update(document, withError: error, isUploaded: false) - let errorLog = ErrorLog( - description: String(describing: error), - error: error) + let errorLog = ErrorLog(description: String(describing: error), + error: error) self.giniConfiguration.errorLogger.handleErrorLog(error: errorLog) guard let giniError = error as? GiniError, giniError != .requestCancelled else { return } self.displayError(errorType: ErrorType(error: giniError), animated: true)