From 057d35030b8fededac700b8f6cfebaf2007456b8 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 6 Apr 2024 22:24:15 -0700 Subject: [PATCH] Fix some build errors. --- iOS/Add/AddFeedViewController.swift | 3 ++- iOS/UIKit Extensions/UIViewController-Extensions.swift | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/iOS/Add/AddFeedViewController.swift b/iOS/Add/AddFeedViewController.swift index 8a294c9b2..1e2d6685d 100644 --- a/iOS/Add/AddFeedViewController.swift +++ b/iOS/Add/AddFeedViewController.swift @@ -11,6 +11,7 @@ import Account import Tree import Parser import Core +import CommonErrors enum AddFeedType { case web @@ -105,7 +106,7 @@ class AddFeedViewController: UITableViewController { } if account!.hasFeed(withURL: url.absoluteString) { - presentError(AccountError.createErrorAlreadySubscribed) + presentError(CommonError.createErrorAlreadySubscribed) return } diff --git a/iOS/UIKit Extensions/UIViewController-Extensions.swift b/iOS/UIKit Extensions/UIViewController-Extensions.swift index cdbb03d6c..6f16099e2 100644 --- a/iOS/UIKit Extensions/UIViewController-Extensions.swift +++ b/iOS/UIKit Extensions/UIViewController-Extensions.swift @@ -8,11 +8,12 @@ import UIKit import Account +import CommonErrors extension UIViewController { func presentError(_ error: Error, dismiss: (() -> Void)? = nil) { - if let accountError = error as? AccountError, accountError.isCredentialsError { + if let accountError = error as? CommonError, accountError.isCredentialsError { presentAccountError(accountError, dismiss: dismiss) } else if let decodingError = error as? DecodingError { let errorTitle = NSLocalizedString("Error", comment: "Error") @@ -55,7 +56,7 @@ extension UIViewController { private extension UIViewController { - func presentAccountError(_ error: AccountError, dismiss: (() -> Void)? = nil) { + func presentAccountError(_ error: CommonError, dismiss: (() -> Void)? = nil) { let title = NSLocalizedString("Account Error", comment: "Account Error") let alertController = UIAlertController(title: title, message: error.localizedDescription, preferredStyle: .alert)