diff --git a/FileProviderExtensionUI/FileProviderCoordinator.swift b/FileProviderExtensionUI/FileProviderCoordinator.swift index 3ea188c03..6d7ceb0f8 100644 --- a/FileProviderExtensionUI/FileProviderCoordinator.swift +++ b/FileProviderExtensionUI/FileProviderCoordinator.swift @@ -63,6 +63,13 @@ class FileProviderCoordinator: Coordinator { func handleError(_ error: Error, for viewController: UIViewController) { DDLogError("Error: \(error)") + if let fileProviderError = error as? FileProviderCoordinatorError { + switch fileProviderError { + case let .unauthorized(vaultName): + showUnauthorizedError(vaultName: vaultName) + return + } + } let alertController = UIAlertController(title: LocalizedString.getValue("common.alert.error.title"), message: error.localizedDescription, preferredStyle: .alert) alertController.addAction(UIAlertAction(title: LocalizedString.getValue("common.button.ok"), style: .default)) viewController.present(alertController, animated: true) @@ -198,15 +205,6 @@ class FileProviderCoordinator: Coordinator { guard let hostViewController = hostViewController else { return } - - if let fileProviderError = error as? FileProviderCoordinatorError { - switch fileProviderError { - case let .unauthorized(vaultName): - showUnauthorizedError(vaultName: vaultName) - return - } - } - handleError(error, for: hostViewController) } } diff --git a/FileProviderExtensionUI/UnauthorizedErrorViewController.swift b/FileProviderExtensionUI/UnauthorizedErrorViewController.swift index 446398c03..10797c1dd 100644 --- a/FileProviderExtensionUI/UnauthorizedErrorViewController.swift +++ b/FileProviderExtensionUI/UnauthorizedErrorViewController.swift @@ -71,10 +71,10 @@ class UnauthorizedErrorViewController: UITableViewController { private class UnauthorizedErrorHeaderView: LargeHeaderFooterView { init(vaultName: String) { - let config = UIImage.SymbolConfiguration(pointSize: 100) + let config = UIImage.SymbolConfiguration(pointSize: 120) let symbolImage = UIImage(systemName: "exclamationmark.triangle.fill", withConfiguration: config)?.withTintColor(.systemYellow, renderingMode: .alwaysOriginal) - let infoText = String(format: LocalizedString.getValue("fileprovider.error.reauthentication"), vaultName) + let infoText = String(format: LocalizedString.getValue("fileprovider.error.unauthorized.text"), vaultName) super.init(image: symbolImage, infoText: infoText) } diff --git a/SharedResources/en.lproj/Localizable.strings b/SharedResources/en.lproj/Localizable.strings index 89df8001e..6445a8fd8 100644 --- a/SharedResources/en.lproj/Localizable.strings +++ b/SharedResources/en.lproj/Localizable.strings @@ -101,7 +101,7 @@ "fileProvider.error.biometricalAuthWrongPassword.message" = "The password that has been saved for %@ is wrong. Please try again and enter your password to re-enable %@."; "fileProvider.error.defaultLock.title" = "Unlock Required"; "fileProvider.error.defaultLock.message" = "To access and show the contents of your vault, it has to be unlocked."; -"fileprovider.error.reauthentication" = "Access to your vault \"%@\" was denied. Open the main app to check your connection and re-authenticate if needed."; +"fileprovider.error.unauthorized.text" = "Access to your vault \"%@\" was denied. Open the main app to check your connection and re-authenticate if needed."; "fileProvider.error.unlockButton" = "Unlock"; "fileProvider.clearFileFromCache.title" = "Clear File from Cache"; "fileProvider.clearFileFromCache.message" = "This only removes the local file from your device and does not delete the file in the cloud.";