From d0cd42c03f02b7ac834e95e0130d337772548e71 Mon Sep 17 00:00:00 2001 From: AakifNadeem Date: Wed, 4 Oct 2023 12:12:09 +0500 Subject: [PATCH 1/2] added xcode 15 support --- iOS/Account/ReaderAPIAddAccountView.swift | 1 + iOS/Add/AddFeedViewController.swift | 1 + iOS/Intents/AddFeedIntentHandler.swift | 8 ++++---- iOS/MainFeed/MainFeedViewController.swift | 14 ++++++++------ .../UIViewController-Extensions.swift | 2 +- 5 files changed, 15 insertions(+), 11 deletions(-) diff --git a/iOS/Account/ReaderAPIAddAccountView.swift b/iOS/Account/ReaderAPIAddAccountView.swift index 5984288c0..603bec2a6 100644 --- a/iOS/Account/ReaderAPIAddAccountView.swift +++ b/iOS/Account/ReaderAPIAddAccountView.swift @@ -12,6 +12,7 @@ import Secrets import RSWeb import SafariServices import RSCore +import ReaderAPI @MainActor struct ReaderAPIAddAccountView: View { diff --git a/iOS/Add/AddFeedViewController.swift b/iOS/Add/AddFeedViewController.swift index 0e46b8c30..2f31881b0 100644 --- a/iOS/Add/AddFeedViewController.swift +++ b/iOS/Add/AddFeedViewController.swift @@ -8,6 +8,7 @@ import UIKit import Account +import AccountError import RSCore import RSTree import RSParser diff --git a/iOS/Intents/AddFeedIntentHandler.swift b/iOS/Intents/AddFeedIntentHandler.swift index 376261962..6e144bf34 100644 --- a/iOS/Intents/AddFeedIntentHandler.swift +++ b/iOS/Intents/AddFeedIntentHandler.swift @@ -27,12 +27,12 @@ public class AddFeedIntentHandler: NSObject, AddFeedIntentHandling { super.init() } - public func resolveURL(for intent: AddFeedIntent, with completion: @escaping (AddFeedURLResolutionResult) -> Void) { - guard let url = intent.url else { + public func resolveUrl(for intent: AddFeedIntent, with completion: @escaping (AddFeedUrlResolutionResult) -> Void) { + if let url = intent.url { + completion(.success(with: url)) + } else { completion(.unsupported(forReason: .required)) - return } - completion(.success(with: url)) } public func resolveTitle(for intent: AddFeedIntent, with completion: @escaping (INStringResolutionResult) -> Void) { diff --git a/iOS/MainFeed/MainFeedViewController.swift b/iOS/MainFeed/MainFeedViewController.swift index fce70ffc1..f6b92bc6f 100644 --- a/iOS/MainFeed/MainFeedViewController.swift +++ b/iOS/MainFeed/MainFeedViewController.swift @@ -1427,7 +1427,7 @@ private extension MainFeedViewController { func rename(indexPath: IndexPath) { guard let feed = coordinator.nodeFor(indexPath)?.representedObject as? FeedProtocol else { return } - let formatString = NSLocalizedString("alert.title.rename-feed.%@", comment: "Rename feed. The variable provided is the feed name. In English: Rename “%@”") + let formatString = NSLocalizedString("alert.title.rename-feed.%@", comment: "Rename feed. The variable provided is the feed name. In English: Rename “%@”") let title = NSString.localizedStringWithFormat(formatString as NSString, feed.nameForDisplay) as String let alertController = UIAlertController(title: title, message: nil, preferredStyle: .alert) @@ -1443,11 +1443,13 @@ private extension MainFeedViewController { } if let feed = feed as? Feed { - do { - try await feed.rename(to: name) - } catch let error { - self?.presentError(error) - } + Task.init(operation: { + do { + try await feed.rename(to: name) + } catch let error { + self?.presentError(error) + } + }) } else if let folder = feed as? Folder { folder.rename(to: name) { result in switch result { diff --git a/iOS/UIKit Extensions/UIViewController-Extensions.swift b/iOS/UIKit Extensions/UIViewController-Extensions.swift index 383225ff4..176877751 100644 --- a/iOS/UIKit Extensions/UIViewController-Extensions.swift +++ b/iOS/UIKit Extensions/UIViewController-Extensions.swift @@ -8,7 +8,7 @@ import UIKit import RSCore -import Account +import AccountError extension UIViewController { From b1a9f7aa4fa2e860868f1c0823a8f97e7c0851e2 Mon Sep 17 00:00:00 2001 From: AakifNadeem Date: Wed, 4 Oct 2023 12:26:09 +0500 Subject: [PATCH 2/2] resolved mainfeedView and mainTimeline view crashes --- iOS/Base.lproj/Main.storyboard | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/iOS/Base.lproj/Main.storyboard b/iOS/Base.lproj/Main.storyboard index b8b7f6e61..80e03a395 100644 --- a/iOS/Base.lproj/Main.storyboard +++ b/iOS/Base.lproj/Main.storyboard @@ -1,9 +1,9 @@ - + - + @@ -18,7 +18,7 @@ -