From 36956c0345487c33b9b4a9a96b67febcedbddaa3 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 2 Jan 2026 10:17:41 -0800 Subject: [PATCH] Fix various SwiftLint warnings. --- Mac/AppDefaults.swift | 4 +-- Mac/CrashReporter/CrashReporter.swift | 2 +- .../AddFeed/AddFeedWindowController.swift | 3 +- .../Sidebar/SidebarViewController.swift | 8 ++--- .../Timeline/TimelineViewController.swift | 2 +- .../PreferencesWindowController.swift | 2 +- .../SafariExtensionHandler.swift | 14 ++++---- Mac/Scripting/Account+Scriptability.swift | 24 ++++++------- Mac/Scripting/AppDelegate+Scriptability.swift | 36 ++++++++++--------- Mac/Scripting/Article+Scriptability.swift | 6 ++-- Mac/Scripting/Author+Scriptability.swift | 32 ++++++++--------- Mac/Scripting/Folder+Scriptability.swift | 14 ++++---- .../NSApplication+Scriptability.swift | 30 +++++++++------- .../NSScriptCommand+NetNewsWire.swift | 30 ++++++++++------ Mac/Scripting/ScriptingObject.swift | 2 +- Mac/Scripting/ScriptingObjectContainer.swift | 16 ++++----- .../Sources/Account/AccountDelegate.swift | 2 +- .../Account/Feedbin/FeedbinAPICaller.swift | 4 +-- .../Feedly/FeedlyAccountDelegate.swift | 2 +- .../LocalAccount/LocalAccountDelegate.swift | 2 +- .../Sources/CloudKitSync/CloudKitZone.swift | 4 +-- .../AppKit/MultilineTextFieldSizer.swift | 2 +- .../RSCore/NotificationCenter+RSCore.swift | 2 +- Modules/RSCore/Sources/RSCore/RSImage.swift | 6 ++-- .../Sources/RSCore/UIKit/UIFont+RSCore.swift | 2 +- .../RSDatabase/FMDatabase+Extras.swift | 2 +- .../Sources/RSTree/TreeController.swift | 2 +- .../RSWeb/HTTPConditionalGetInfo.swift | 2 +- .../Sources/RSWeb/HTTPLinkPagingInfo.swift | 2 +- .../Sources/Secrets/CredentialsManager.swift | 2 +- iOS/Article/WebViewController.swift | 4 +-- iOS/SceneCoordinator.swift | 18 +++++----- 32 files changed, 149 insertions(+), 134 deletions(-) diff --git a/Mac/AppDefaults.swift b/Mac/AppDefaults.swift index 2b8050e12..a62b8c12d 100644 --- a/Mac/AppDefaults.swift +++ b/Mac/AppDefaults.swift @@ -324,7 +324,7 @@ final class AppDefaults: Sendable { let showDebugMenu = false #endif - let defaults: [String : Any] = [ + let defaults: [String: Any] = [ Key.sidebarFontSize: FontSize.medium.rawValue, Key.timelineFontSize: FontSize.medium.rawValue, Key.detailFontSize: FontSize.medium.rawValue, @@ -428,7 +428,7 @@ private extension AppDefaults { UserDefaults.standard.set(date, forKey: key) } - static func sortDirection(for key:String) -> ComparisonResult { + static func sortDirection(for key: String) -> ComparisonResult { let rawInt = int(for: key) if rawInt == ComparisonResult.orderedAscending.rawValue { return .orderedAscending diff --git a/Mac/CrashReporter/CrashReporter.swift b/Mac/CrashReporter/CrashReporter.swift index 8ba518ad5..03f09db8c 100644 --- a/Mac/CrashReporter/CrashReporter.swift +++ b/Mac/CrashReporter/CrashReporter.swift @@ -52,7 +52,7 @@ import CrashReporter let boundary = "0xKhTmLbOuNdArY" let contentType = "multipart/form-data; boundary=\(boundary)" - request.setValue(contentType, forHTTPHeaderField:HTTPRequestHeader.contentType) + request.setValue(contentType, forHTTPHeaderField: HTTPRequestHeader.contentType) let formString = "--\(boundary)\r\nContent-Disposition: form-data; name=\"crashlog\"\r\n\r\n\(crashLogText)\r\n--\(boundary)--\r\n" let formData = formString.data(using: .utf8, allowLossyConversion: true) diff --git a/Mac/MainWindow/AddFeed/AddFeedWindowController.swift b/Mac/MainWindow/AddFeed/AddFeedWindowController.swift index d69a2103e..f36f62623 100644 --- a/Mac/MainWindow/AddFeed/AddFeedWindowController.swift +++ b/Mac/MainWindow/AddFeed/AddFeedWindowController.swift @@ -18,8 +18,7 @@ import Account func addFeedWindowControllerUserDidCancel(_: AddFeedWindowController) } -final class AddFeedWindowController : NSWindowController { - +final class AddFeedWindowController: NSWindowController { @IBOutlet var urlTextField: NSTextField! @IBOutlet var nameTextField: NSTextField! @IBOutlet var addButton: NSButton! diff --git a/Mac/MainWindow/Sidebar/SidebarViewController.swift b/Mac/MainWindow/Sidebar/SidebarViewController.swift index 1655e1d19..119275be4 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController.swift @@ -136,7 +136,7 @@ extension Notification.Name { /// Restore state using legacy state restoration data. /// /// TODO: Delete for NetNewsWire 7. - func restoreLegacyState(from state: [AnyHashable : Any]) { + func restoreLegacyState(from state: [AnyHashable: Any]) { if let containerExpandedWindowState = state[UserInfoKey.containerExpandedWindowState] as? [[AnyHashable: AnyHashable]] { let containerIdentifiers = containerExpandedWindowState.compactMap( { ContainerIdentifier(userInfo: $0) }) @@ -504,7 +504,7 @@ extension Notification.Name { revealAndSelectRepresentedObject(sidebarItem as AnyObject) } - func deepLinkRevealAndSelect(for userInfo: [AnyHashable : Any]) { + func deepLinkRevealAndSelect(for userInfo: [AnyHashable: Any]) { guard let accountNode = findAccountNode(userInfo), let feedNode = findFeedNode(userInfo, beginningAt: accountNode), let sidebarItem = feedNode.representedObject as? SidebarItem else { @@ -758,7 +758,7 @@ private extension SidebarViewController { return nil } - func findAccountNode(_ userInfo: [AnyHashable : Any]?) -> Node? { + func findAccountNode(_ userInfo: [AnyHashable: Any]?) -> Node? { guard let accountID = userInfo?[ArticlePathKey.accountID] as? String else { return nil } @@ -778,7 +778,7 @@ private extension SidebarViewController { return nil } - func findFeedNode(_ userInfo: [AnyHashable : Any]?, beginningAt startingNode: Node) -> Node? { + func findFeedNode(_ userInfo: [AnyHashable: Any]?, beginningAt startingNode: Node) -> Node? { guard let feedID = userInfo?[ArticlePathKey.feedID] as? String else { return nil } diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index c6cd122f0..0160b6be1 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -605,7 +605,7 @@ final class TimelineViewController: NSViewController, UndoableCommandRunner, Unr // MARK: - Navigation - func goToDeepLink(for userInfo: [AnyHashable : Any]) { + func goToDeepLink(for userInfo: [AnyHashable: Any]) { guard let articleID = userInfo[ArticlePathKey.articleID] as? String else { return } if isReadFiltered ?? false { diff --git a/Mac/Preferences/PreferencesWindowController.swift b/Mac/Preferences/PreferencesWindowController.swift index 0d0e7d3ad..0e223c2a7 100644 --- a/Mac/Preferences/PreferencesWindowController.swift +++ b/Mac/Preferences/PreferencesWindowController.swift @@ -27,7 +27,7 @@ private struct ToolbarItemIdentifier { static let Advanced = "Advanced" } -final class PreferencesWindowController : NSWindowController, NSToolbarDelegate { +final class PreferencesWindowController: NSWindowController, NSToolbarDelegate { private let windowWidth = CGFloat(512.0) // Width is constant for all views; only the height changes private var viewControllers = [String: NSViewController]() diff --git a/Mac/SafariExtension/SafariExtensionHandler.swift b/Mac/SafariExtension/SafariExtensionHandler.swift index 88d8a92df..4ec06acc7 100644 --- a/Mac/SafariExtension/SafariExtensionHandler.swift +++ b/Mac/SafariExtension/SafariExtensionHandler.swift @@ -40,7 +40,7 @@ final class SafariExtensionHandler: SFSafariExtensionHandler { } } - override func messageReceived(withName messageName: String, from page: SFSafariPage, userInfo: [String : Any]?) { + override func messageReceived(withName messageName: String, from page: SFSafariPage, userInfo: [String: Any]?) { if (messageName == "subscribeToFeed") { if var feedURLString = userInfo?["url"] as? String { var openInDefaultBrowser = false @@ -66,7 +66,7 @@ final class SafariExtensionHandler: SFSafariExtensionHandler { if let validationIDString = userInfo?["validationID"] as? String { // Should we validate the button? let shouldValidate = userInfo?["shouldValidate"] as? Bool ?? false - SafariExtensionHandler.callValidationHandler(forHandlerID: validationIDString, withShouldValidate:shouldValidate) + SafariExtensionHandler.callValidationHandler(forHandlerID: validationIDString, withShouldValidate: shouldValidate) } } } @@ -108,17 +108,17 @@ final class SafariExtensionHandler: SFSafariExtensionHandler { // a timeout period has elapsed window.getActiveTab { (activeTab) in guard let activeTab = activeTab else { - SafariExtensionHandler.callValidationHandler(forHandlerID: uniqueValidationID, withShouldValidate:false); + SafariExtensionHandler.callValidationHandler(forHandlerID: uniqueValidationID, withShouldValidate: false); return } activeTab.getActivePage { (activePage) in guard let activePage = activePage else { - SafariExtensionHandler.callValidationHandler(forHandlerID: uniqueValidationID, withShouldValidate:false); - return + SafariExtensionHandler.callValidationHandler(forHandlerID: uniqueValidationID, withShouldValidate: false); + return } - activePage.getPropertiesWithCompletionHandler { (pageProperties) in + activePage.getPropertiesWithCompletionHandler { pageProperties in if let isActive = pageProperties?.isActive { if isActive { // Capture the uniqueValidationID to ensure it doesn't change out from under us on a future call @@ -127,7 +127,7 @@ final class SafariExtensionHandler: SFSafariExtensionHandler { let pongTimeoutInNanoseconds = Int(Double(NSEC_PER_SEC) * 0.5) let timeoutDeadline = DispatchTime.now() + DispatchTimeInterval.nanoseconds(pongTimeoutInNanoseconds) DispatchQueue.main.asyncAfter(deadline: timeoutDeadline, execute: { [timedOutValidationID = uniqueValidationID] in - SafariExtensionHandler.callValidationHandler(forHandlerID: timedOutValidationID, withShouldValidate:false) + SafariExtensionHandler.callValidationHandler(forHandlerID: timedOutValidationID, withShouldValidate: false) }) } } diff --git a/Mac/Scripting/Account+Scriptability.swift b/Mac/Scripting/Account+Scriptability.swift index 46c7c03e0..d8a9f24ec 100644 --- a/Mac/Scripting/Account+Scriptability.swift +++ b/Mac/Scripting/Account+Scriptability.swift @@ -65,7 +65,7 @@ import RSCore self.classDescription as! NSScriptClassDescription } - func deleteElement(_ element:ScriptingObject) { + func deleteElement(_ element: ScriptingObject) { if let scriptableFolder = element as? ScriptableFolder { BatchUpdate.shared.perform { account.removeFolder(scriptableFolder.folder) { _ in @@ -94,7 +94,7 @@ import RSCore @objc(feeds) var feeds: NSArray { - account.topLevelFeeds.map { ScriptableFeed($0, container:self) } as NSArray + account.topLevelFeeds.map { ScriptableFeed($0, container: self) } as NSArray } @objc(countOfFeeds) @@ -116,23 +116,23 @@ import RSCore guard let feed = account.existingFeed(withFeedID: id) else { return nil } - return ScriptableFeed(feed, container:self) + return ScriptableFeed(feed, container: self) } @objc(valueInFeedsWithName:) func valueInFeeds(withName name: String) -> ScriptableFeed? { let feeds = Array(account.flattenedFeeds()) - guard let feed = feeds.first(where:{$0.name == name}) else { + guard let feed = feeds.first(where: { $0.name == name }) else { return nil } - return ScriptableFeed(feed, container:self) + return ScriptableFeed(feed, container: self) } @objc(folders) var folders: NSArray { let foldersSet = account.folders ?? Set() let folders = Array(foldersSet) - return folders.map { ScriptableFolder($0, container:self) } as NSArray + return folders.map { ScriptableFolder($0, container: self) } as NSArray } @objc(countOfFolders) @@ -151,14 +151,14 @@ import RSCore } @objc(valueInFoldersWithUniqueID:) - func valueInFolders(withUniqueID id:NSNumber) -> ScriptableFolder? { + func valueInFolders(withUniqueID id: NSNumber) -> ScriptableFolder? { let folderId = id.intValue let foldersSet = account.folders ?? Set() let folders = Array(foldersSet) - guard let folder = folders.first(where:{$0.folderID == folderId}) else { + guard let folder = folders.first(where: { $0.folderID == folderId }) else { return nil } - return ScriptableFolder(folder, container:self) + return ScriptableFolder(folder, container: self) } // MARK: --- Scriptable properties --- @@ -191,7 +191,7 @@ import RSCore guard let feed = account.existingFeed(withFeedID: id) else { return nil } - return ScriptableFeed(feed, container:self) + return ScriptableFeed(feed, container: self) } @objc(valueInAllFeedsWithName:) @@ -200,12 +200,12 @@ import RSCore guard let feed = feeds.first(where: {$0.name == name}) else { return nil } - return ScriptableFeed(feed, container:self) + return ScriptableFeed(feed, container: self) } @objc(opmlRepresentation) var opmlRepresentation: String { - self.account.OPMLString(indentLevel:0) + self.account.OPMLString(indentLevel: 0) } @objc(accountType) diff --git a/Mac/Scripting/AppDelegate+Scriptability.swift b/Mac/Scripting/AppDelegate+Scriptability.swift index 20710ad6f..3bb136e14 100644 --- a/Mac/Scripting/AppDelegate+Scriptability.swift +++ b/Mac/Scripting/AppDelegate+Scriptability.swift @@ -27,7 +27,7 @@ import Articles @MainActor protocol ScriptingAppDelegate { var scriptingCurrentArticle: Article? {get} var scriptingSelectedArticles: [Article] {get} - var scriptingMainWindowController:ScriptingMainWindowController? {get} + var scriptingMainWindowController: ScriptingMainWindowController? {get} } // Wrapper to safely transfer non-Sendable values across isolation boundaries @@ -96,7 +96,7 @@ extension AppDelegate: AppDelegateAppleEvents { } } -final class NetNewsWireCreateElementCommand : NSCreateCommand { +final class NetNewsWireCreateElementCommand: NSCreateCommand { // AppleScript commands always execute on the main thread, so using assumeIsolated is safe // even though NSCreateCommand doesn't have concurrency annotations nonisolated override func performDefaultImplementation() -> Any? { @@ -106,9 +106,9 @@ final class NetNewsWireCreateElementCommand : NSCreateCommand { let classDescription: NSScriptClassDescription = instance.createClassDescription let command: NSCreateCommand = instance if (classDescription.className == "feed") { - return UnsafeSendable(value: ScriptableFeed.handleCreateElement(command:command)) + return UnsafeSendable(value: ScriptableFeed.handleCreateElement(command: command)) } else if (classDescription.className == "folder") { - return UnsafeSendable(value: ScriptableFolder.handleCreateElement(command:command)) + return UnsafeSendable(value: ScriptableFolder.handleCreateElement(command: command)) } return UnsafeSendable(value: nil) } @@ -124,7 +124,7 @@ final class NetNewsWireCreateElementCommand : NSCreateCommand { is ambiguity about whether specifiers are lists or single objects, the code switches based on which it is. */ -final class NetNewsWireDeleteCommand : NSDeleteCommand { +final class NetNewsWireDeleteCommand: NSDeleteCommand { /* delete(objectToDelete:, from container:) @@ -132,10 +132,10 @@ final class NetNewsWireDeleteCommand : NSDeleteCommand { Here the code unravels the case of objectToDelete being a list or a single object, ultimately calling container.deleteElement(element) for each element to delete */ - @MainActor func delete(objectToDelete:Any, from container:ScriptingObjectContainer) { + @MainActor func delete(objectToDelete: Any, from container: ScriptingObjectContainer) { if let objectList = objectToDelete as? [Any] { for nthObject in objectList { - self.delete(objectToDelete:nthObject, from:container) + self.delete(objectToDelete: nthObject, from: container) } } else if let element = objectToDelete as? ScriptingObject { container.deleteElement(element) @@ -151,14 +151,14 @@ final class NetNewsWireDeleteCommand : NSDeleteCommand { After resolving, we call delete(objectToDelete:, from container:) with the container and the resolved objects */ - @MainActor func delete(specifier:NSScriptObjectSpecifier, from container:Any) { + @MainActor func delete(specifier: NSScriptObjectSpecifier, from container: Any) { if let containerList = container as? [Any] { for nthObject in containerList { - self.delete(specifier:specifier, from:nthObject) + self.delete(specifier: specifier, from: nthObject) } } else if let container = container as? ScriptingObjectContainer { - if let resolvedObjects = specifier.objectsByEvaluating(withContainers:container) { - self.delete(objectToDelete:resolvedObjects, from:container) + if let resolvedObjects = specifier.objectsByEvaluating(withContainers: container) { + self.delete(objectToDelete: resolvedObjects, from: container) } } } @@ -176,14 +176,14 @@ final class NetNewsWireDeleteCommand : NSDeleteCommand { MainActor.assumeIsolated { let instance = unsafeSelf.value if let receiverObjects = instance.receiversSpecifier?.objectsByEvaluatingSpecifier { - instance.delete(specifier:instance.keySpecifier, from:receiverObjects) + instance.delete(specifier: instance.keySpecifier, from: receiverObjects) } } return nil } } -final class NetNewsWireExistsCommand : NSExistsCommand { +final class NetNewsWireExistsCommand: NSExistsCommand { // cocoa default behavior doesn't work here, because of cases where we define an object's property // to be another object type. e.g., 'permalink of the current article' parses as @@ -195,9 +195,11 @@ final class NetNewsWireExistsCommand : NSExistsCommand { // The wrinkle is that it is possible that the direct object is a list, so we need to // handle that case as well - override func performDefaultImplementation() -> Any? { - guard let result = super.performDefaultImplementation() else { return NSNumber(booleanLiteral:false) } - return result - } + override func performDefaultImplementation() -> Any? { + guard let result = super.performDefaultImplementation() else { + return NSNumber(booleanLiteral: false) + } + return result + } } diff --git a/Mac/Scripting/Article+Scriptability.swift b/Mac/Scripting/Article+Scriptability.swift index 6f021331e..91b83272e 100644 --- a/Mac/Scripting/Article+Scriptability.swift +++ b/Mac/Scripting/Article+Scriptability.swift @@ -48,7 +48,7 @@ import Articles return self.classDescription as! NSScriptClassDescription } - func deleteElement(_ element:ScriptingObject) { + func deleteElement(_ element: ScriptingObject) { print ("delete event not handled") } @@ -117,7 +117,7 @@ import Articles @objc(starred) var starred: Bool { get { - article.status.boolStatus(forKey:.starred) + article.status.boolStatus(forKey: .starred) } set { markArticles([self.article], statusKey: .starred, flag: newValue) @@ -137,7 +137,7 @@ import Articles @objc(authors) var authors: NSArray { let articleAuthors = article.authors ?? [] - return articleAuthors.map { ScriptableAuthor($0, container:self) } as NSArray + return articleAuthors.map { ScriptableAuthor($0, container: self) } as NSArray } @objc(feed) diff --git a/Mac/Scripting/Author+Scriptability.swift b/Mac/Scripting/Author+Scriptability.swift index 705a563b4..dd20cf4f7 100644 --- a/Mac/Scripting/Author+Scriptability.swift +++ b/Mac/Scripting/Author+Scriptability.swift @@ -15,7 +15,7 @@ import Articles let author: Author nonisolated(unsafe) let container: ScriptingObjectContainer - init (_ author: Author, container: ScriptingObjectContainer) { + init(_ author: Author, container: ScriptingObjectContainer) { self.author = author self.container = container } @@ -28,41 +28,41 @@ import Articles @objc(scriptingSpecifierDescriptor) func scriptingSpecifierDescriptor() -> NSScriptObjectSpecifier { - return (self.objectSpecifier ?? NSScriptObjectSpecifier() ) + objectSpecifier ?? NSScriptObjectSpecifier() } - // MARK: --- ScriptingObject protocol --- + // MARK: - ScriptingObject protocol nonisolated var scriptingKey: String { - return "authors" + "authors" } - // MARK: --- UniqueIdScriptingObject protocol --- + // MARK: - UniqueIdScriptingObject protocol @objc(uniqueId) - nonisolated var scriptingUniqueID:Any { - return author.authorID + nonisolated var scriptingUniqueID: Any { + author.authorID } - // MARK: --- Scriptable properties --- + // MARK: - Scriptable properties @objc(url) - var url:String { - return self.author.url ?? "" + var url: String { + author.url ?? "" } @objc(name) - var name:String { - return self.author.name ?? "" + var name: String { + author.name ?? "" } @objc(avatarURL) - var avatarURL:String { - return self.author.avatarURL ?? "" + var avatarURL: String { + author.avatarURL ?? "" } @objc(emailAddress) - var emailAddress:String { - return self.author.emailAddress ?? "" + var emailAddress: String { + author.emailAddress ?? "" } } diff --git a/Mac/Scripting/Folder+Scriptability.swift b/Mac/Scripting/Folder+Scriptability.swift index 6fc533108..bb0ff646c 100644 --- a/Mac/Scripting/Folder+Scriptability.swift +++ b/Mac/Scripting/Folder+Scriptability.swift @@ -16,7 +16,7 @@ import RSCore let folder: Folder nonisolated(unsafe) let container: ScriptingObjectContainer - init (_ folder:Folder, container: ScriptingObjectContainer) { + init (_ folder: Folder, container: ScriptingObjectContainer) { self.folder = folder self.container = container } @@ -39,7 +39,7 @@ import RSCore // but in either case it seems like the accountID would be used as the keydata, so I chose ID @objc(uniqueId) - nonisolated var scriptingUniqueID:Any { + nonisolated var scriptingUniqueID: Any { folder.folderID } @@ -94,7 +94,7 @@ import RSCore return nil } - // MARK: --- Scriptable elements --- + // MARK: - Scriptable elements @objc(feeds) var feeds: NSArray { @@ -112,7 +112,7 @@ import RSCore let sortedArticles = allArticles.sorted(by: { $0.logicalDatePublished > $1.logicalDatePublished }) - return sortedArticles.map { ScriptableArticle($0, container:self) } as NSArray + return sortedArticles.map { ScriptableArticle($0, container: self) } as NSArray } @objc(countOfArticles) @@ -142,12 +142,12 @@ import RSCore // MARK: - Scriptable properties @objc(name) - var name:String { + var name: String { folder.name ?? "" } @objc(opmlRepresentation) - var opmlRepresentation:String { - folder.OPMLString(indentLevel:0) + var opmlRepresentation: String { + folder.OPMLString(indentLevel: 0) } } diff --git a/Mac/Scripting/NSApplication+Scriptability.swift b/Mac/Scripting/NSApplication+Scriptability.swift index 3d6600324..0657dddce 100644 --- a/Mac/Scripting/NSApplication+Scriptability.swift +++ b/Mac/Scripting/NSApplication+Scriptability.swift @@ -10,14 +10,14 @@ import AppKit import Account import Articles -extension NSApplication : @preconcurrency ScriptingObjectContainer { +extension NSApplication: @preconcurrency ScriptingObjectContainer { // MARK: - ScriptingObjectContainer protocol nonisolated var scriptingClassDescription: NSScriptClassDescription { return self.classDescription as! NSScriptClassDescription } - func deleteElement(_ element:ScriptingObject) { + func deleteElement(_ element: ScriptingObject) { print ("delete event not handled") } @@ -40,10 +40,10 @@ extension NSApplication : @preconcurrency ScriptingObjectContainer { @objc(selectedArticles) func selectedArticles() -> NSArray { let articles = appDelegate.scriptingSelectedArticles - let scriptableArticles:[ScriptableArticle] = articles.compactMap { article in + let scriptableArticles: [ScriptableArticle] = articles.compactMap { article in if let feed = article.feed, let scriptableFeed = ScriptableFeed.scriptableFeed(for: feed) { - return ScriptableArticle(article, container:scriptableFeed) + return ScriptableArticle(article, container: scriptableFeed) } else { return nil } @@ -91,9 +91,11 @@ extension NSApplication : @preconcurrency ScriptingObjectContainer { } @objc(valueInAccountsWithUniqueID:) - func valueInAccounts(withUniqueID id:String) -> ScriptableAccount? { + func valueInAccounts(withUniqueID id: String) -> ScriptableAccount? { let accounts = AccountManager.shared.accounts - guard let account = accounts.first(where:{$0.accountID == id}) else { return nil } + guard let account = accounts.first(where: { $0.accountID == id }) else { + return nil + } return ScriptableAccount(account) } @@ -105,7 +107,7 @@ extension NSApplication : @preconcurrency ScriptingObjectContainer { func allFeeds() -> [Feed] { let accounts = AccountManager.shared.activeAccounts - let emptyFeeds:[Feed] = [] + let emptyFeeds: [Feed] = [] return accounts.reduce(emptyFeeds) { (result, nthAccount) -> [Feed] in let accountFeeds = Array(nthAccount.topLevelFeeds) return result + accountFeeds @@ -114,7 +116,7 @@ extension NSApplication : @preconcurrency ScriptingObjectContainer { @objc(feeds) func feeds() -> NSArray { - allFeeds().map { ScriptableFeed($0, container:self) } as NSArray + allFeeds().map { ScriptableFeed($0, container: self) } as NSArray } @objc(countOfFeeds) @@ -125,14 +127,18 @@ extension NSApplication : @preconcurrency ScriptingObjectContainer { @objc(objectInFeedsAtIndex:) func objectInFeedsAtIndex(_ index: Int) -> ScriptableFeed? { let feeds = allFeeds() - guard index >= 0 && index < feeds.count else { return nil } + guard index >= 0 && index < feeds.count else { + return nil + } return ScriptableFeed(feeds[index], container: self) } @objc(valueInFeedsWithUniqueID:) - func valueInFeeds(withUniqueID id:String) -> ScriptableFeed? { + func valueInFeeds(withUniqueID id: String) -> ScriptableFeed? { let feeds = allFeeds() - guard let feed = feeds.first(where:{$0.feedID == id}) else { return nil } - return ScriptableFeed(feed, container:self) + guard let feed = feeds.first(where: { $0.feedID == id} ) else { + return nil + } + return ScriptableFeed(feed, container: self) } } diff --git a/Mac/Scripting/NSScriptCommand+NetNewsWire.swift b/Mac/Scripting/NSScriptCommand+NetNewsWire.swift index 763e67d68..46e7f6952 100644 --- a/Mac/Scripting/NSScriptCommand+NetNewsWire.swift +++ b/Mac/Scripting/NSScriptCommand+NetNewsWire.swift @@ -10,7 +10,7 @@ import Foundation import Account @MainActor extension NSScriptCommand { - func property(forKey key:String) -> Any? { + func property(forKey key: String) -> Any? { if let evaluatedArguments = self.evaluatedArguments { if let props = evaluatedArguments["KeyDictionary"] as? [String: Any] { return props[key] @@ -19,20 +19,26 @@ import Account return nil } - func isCreateCommand(forClass whatClass:String) -> Bool { - guard let arguments = self.arguments else {return false} - guard let newObjectClass = arguments["ObjectClass"] as? Int else {return false} - guard (newObjectClass.fourCharCode == whatClass.fourCharCode) else {return false} + func isCreateCommand(forClass whatClass: String) -> Bool { + guard let arguments = self.arguments else { + return false + } + guard let newObjectClass = arguments["ObjectClass"] as? Int else { + return false + } + guard (newObjectClass.fourCharCode == whatClass.fourCharCode) else { + return false + } return true } func accountAndFolderForNewChild() -> (Account, Folder?) { let appleEvent = self.appleEvent var account = AccountManager.shared.defaultAccount - var folder:Folder? + var folder: Folder? if let appleEvent = appleEvent { - var descriptorToConsider:NSAppleEventDescriptor? - if let insertionLocationDescriptor = appleEvent.paramDescriptor(forKeyword:keyAEInsertHere) { + var descriptorToConsider: NSAppleEventDescriptor? + if let insertionLocationDescriptor = appleEvent.paramDescriptor(forKeyword: keyAEInsertHere) { print("insertionLocation : \(insertionLocationDescriptor)") // insertion location can be a typeObjectSpecifier, e.g. 'in account "Acct"' // or a typeInsertionLocation, e.g. 'at end of folder " @@ -41,12 +47,14 @@ import Account } else if ( insertionLocationDescriptor.descriptorType == "obj ".fourCharCode) { descriptorToConsider = insertionLocationDescriptor } - } else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword:"subj".fourCharCode) { + } else if let subjectDescriptor = appleEvent.attributeDescriptor(forKeyword: "subj".fourCharCode) { descriptorToConsider = subjectDescriptor } - if let descriptorToConsider = descriptorToConsider { - guard let newContainerSpecifier = NSScriptObjectSpecifier(descriptor:descriptorToConsider) else {return (account, folder)} + if let descriptorToConsider { + guard let newContainerSpecifier = NSScriptObjectSpecifier(descriptor: descriptorToConsider) else { + return (account, folder) + } let newContainer = newContainerSpecifier.objectsByEvaluatingSpecifier if let scriptableAccount = newContainer as? ScriptableAccount { account = scriptableAccount.account diff --git a/Mac/Scripting/ScriptingObject.swift b/Mac/Scripting/ScriptingObject.swift index a03be12d0..6952b0d30 100644 --- a/Mac/Scripting/ScriptingObject.swift +++ b/Mac/Scripting/ScriptingObject.swift @@ -14,7 +14,7 @@ protocol ScriptingObject { } protocol NamedScriptingObject: ScriptingObject { - var name:String { get } + var name: String { get } } protocol UniqueIDScriptingObject: ScriptingObject { diff --git a/Mac/Scripting/ScriptingObjectContainer.swift b/Mac/Scripting/ScriptingObjectContainer.swift index df4505c38..a73973924 100644 --- a/Mac/Scripting/ScriptingObjectContainer.swift +++ b/Mac/Scripting/ScriptingObjectContainer.swift @@ -10,29 +10,29 @@ import AppKit import Account protocol ScriptingObjectContainer: ScriptingObject { - var scriptingClassDescription:NSScriptClassDescription { get } - func deleteElement(_ element:ScriptingObject) + var scriptingClassDescription: NSScriptClassDescription { get } + func deleteElement(_ element: ScriptingObject) } extension ScriptingObjectContainer { - nonisolated func makeFormNameScriptObjectSpecifier(forObject object:NamedScriptingObject) -> NSScriptObjectSpecifier? { + nonisolated func makeFormNameScriptObjectSpecifier(forObject object: NamedScriptingObject) -> NSScriptObjectSpecifier? { let containerClassDescription = self.scriptingClassDescription let containerScriptObjectSpecifier = self.objectSpecifier let scriptingKey = object.scriptingKey let name = object.name - let specifier = NSNameSpecifier(containerClassDescription:containerClassDescription, - containerSpecifier:containerScriptObjectSpecifier, key:scriptingKey, name:name) + let specifier = NSNameSpecifier(containerClassDescription: containerClassDescription, + containerSpecifier: containerScriptObjectSpecifier, key: scriptingKey, name: name) return specifier } - nonisolated func makeFormUniqueIDScriptObjectSpecifier(forObject object:UniqueIDScriptingObject) -> NSScriptObjectSpecifier? { + nonisolated func makeFormUniqueIDScriptObjectSpecifier(forObject object: UniqueIDScriptingObject) -> NSScriptObjectSpecifier? { let containerClassDescription = self.scriptingClassDescription let containerScriptObjectSpecifier = self.objectSpecifier let scriptingKey = object.scriptingKey let uniqueId = object.scriptingUniqueID - let specifier = NSUniqueIDSpecifier(containerClassDescription:containerClassDescription, - containerSpecifier:containerScriptObjectSpecifier, key:scriptingKey, uniqueID: uniqueId) + let specifier = NSUniqueIDSpecifier(containerClassDescription: containerClassDescription, + containerSpecifier: containerScriptObjectSpecifier, key: scriptingKey, uniqueID: uniqueId) return specifier } } diff --git a/Modules/Account/Sources/Account/AccountDelegate.swift b/Modules/Account/Sources/Account/AccountDelegate.swift index e362d81c7..33e58b399 100644 --- a/Modules/Account/Sources/Account/AccountDelegate.swift +++ b/Modules/Account/Sources/Account/AccountDelegate.swift @@ -23,7 +23,7 @@ import Secrets var refreshProgress: DownloadProgress { get } - func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable : Any]) async + func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable: Any]) async func refreshAll(for account: Account) async throws func syncArticleStatus(for account: Account) async throws diff --git a/Modules/Account/Sources/Account/Feedbin/FeedbinAPICaller.swift b/Modules/Account/Sources/Account/Feedbin/FeedbinAPICaller.swift index fe2d157a6..e479f744f 100644 --- a/Modules/Account/Sources/Account/Feedbin/FeedbinAPICaller.swift +++ b/Modules/Account/Sources/Account/Feedbin/FeedbinAPICaller.swift @@ -254,7 +254,7 @@ enum CreateSubscriptionResult { let payload = try JSONEncoder().encode(FeedbinCreateTagging(feedID: feedID, name: name)) - let (response, _) = try await transport.send(request: request, method: HTTPMethod.post, payload:payload) + let (response, _) = try await transport.send(request: request, method: HTTPMethod.post, payload: payload) if let taggingLocation = response.valueForHTTPHeaderField(HTTPResponseHeader.location), let lowerBound = taggingLocation.range(of: "v2/taggings/")?.upperBound, @@ -463,7 +463,7 @@ enum CreateSubscriptionResult { extension FeedbinAPICaller { - func storeConditionalGet(key: String, headers: [AnyHashable : Any]) { + func storeConditionalGet(key: String, headers: [AnyHashable: Any]) { if var conditionalGet = accountMetadata?.conditionalGetInfo { conditionalGet[key] = HTTPConditionalGetInfo(headers: headers) accountMetadata?.conditionalGetInfo = conditionalGet diff --git a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift index 378f2de95..1fd6d7df3 100644 --- a/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift +++ b/Modules/Account/Sources/Account/Feedly/FeedlyAccountDelegate.swift @@ -104,7 +104,7 @@ import Secrets // MARK: Account API - func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable : Any]) async { + func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable: Any]) async { } func refreshAll(for account: Account) async throws { diff --git a/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift b/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift index a34476309..d9f5741d6 100644 --- a/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift +++ b/Modules/Account/Sources/Account/LocalAccount/LocalAccountDelegate.swift @@ -36,7 +36,7 @@ import Secrets refresher.downloadProgress }() - func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable : Any]) async { + func receiveRemoteNotification(for account: Account, userInfo: [AnyHashable: Any]) async { } @MainActor func refreshAll(for account: Account) async throws { diff --git a/Modules/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift b/Modules/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift index ddd570625..5ef5fc670 100644 --- a/Modules/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift +++ b/Modules/CloudKitSync/Sources/CloudKitSync/CloudKitZone.swift @@ -59,7 +59,7 @@ public typealias CloudKitRecordKey = (recordType: CKRecord.RecordType, recordID: func subscribeToZoneChanges() /// Process a remove notification - func receiveRemoteNotification(userInfo: [AnyHashable : Any]) async + func receiveRemoteNotification(userInfo: [AnyHashable: Any]) async } @@ -126,7 +126,7 @@ public extension CloudKitZone { }) } - func receiveRemoteNotification(userInfo: [AnyHashable : Any]) async { + func receiveRemoteNotification(userInfo: [AnyHashable: Any]) async { let note = CKRecordZoneNotification(fromRemoteNotificationDictionary: userInfo) guard note?.recordZoneID?.zoneName == zoneID.zoneName else { return diff --git a/Modules/RSCore/Sources/RSCore/AppKit/MultilineTextFieldSizer.swift b/Modules/RSCore/Sources/RSCore/AppKit/MultilineTextFieldSizer.swift index 4f13c5668..2ffec8b92 100644 --- a/Modules/RSCore/Sources/RSCore/AppKit/MultilineTextFieldSizer.swift +++ b/Modules/RSCore/Sources/RSCore/AppKit/MultilineTextFieldSizer.swift @@ -30,7 +30,7 @@ public struct TextFieldSizeInfo: Sendable { private let numberOfLines: Int private let font: NSFont - private let textField:NSTextField + private let textField: NSTextField private let singleLineHeightEstimate: Int private let doubleLineHeightEstimate: Int private var cache = [String: WidthHeightCache]() // Each string has a cache. diff --git a/Modules/RSCore/Sources/RSCore/NotificationCenter+RSCore.swift b/Modules/RSCore/Sources/RSCore/NotificationCenter+RSCore.swift index d15706b60..8a7829a80 100644 --- a/Modules/RSCore/Sources/RSCore/NotificationCenter+RSCore.swift +++ b/Modules/RSCore/Sources/RSCore/NotificationCenter+RSCore.swift @@ -9,7 +9,7 @@ import Foundation public extension NotificationCenter { - nonisolated func postOnMainThread(name: Notification.Name, object: Any?, userInfo: [AnyHashable : Any]? = nil) { + nonisolated func postOnMainThread(name: Notification.Name, object: Any?, userInfo: [AnyHashable: Any]? = nil) { nonisolated(unsafe) let capturedObject = object nonisolated(unsafe) let capturedUserInfo = userInfo Task { @MainActor in diff --git a/Modules/RSCore/Sources/RSCore/RSImage.swift b/Modules/RSCore/Sources/RSCore/RSImage.swift index 1e2c10ec4..808d9d0d0 100644 --- a/Modules/RSCore/Sources/RSCore/RSImage.swift +++ b/Modules/RSCore/Sources/RSCore/RSImage.swift @@ -246,9 +246,9 @@ public extension RSImage { RSImageLogger.debug("RSImageLogger: createThumbnail image source count = \(count, privacy: .public)") } - let options = [kCGImageSourceCreateThumbnailWithTransform : true, - kCGImageSourceCreateThumbnailFromImageIfAbsent : true, - kCGImageSourceThumbnailMaxPixelSize : NSNumber(value: maxPixelSize)] + let options = [kCGImageSourceCreateThumbnailWithTransform: true, + kCGImageSourceCreateThumbnailFromImageIfAbsent: true, + kCGImageSourceThumbnailMaxPixelSize: NSNumber(value: maxPixelSize)] return CGImageSourceCreateThumbnailAtIndex(imageSource, 0, options as CFDictionary) } } diff --git a/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift b/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift index 42b566032..ec68e3fd2 100644 --- a/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift +++ b/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift @@ -12,7 +12,7 @@ import UIKit extension UIFont { - func withTraits(traits:UIFontDescriptor.SymbolicTraits) -> UIFont { + func withTraits(traits: UIFontDescriptor.SymbolicTraits) -> UIFont { if let descriptor = fontDescriptor.withSymbolicTraits(traits) { return UIFont(descriptor: descriptor, size: 0) //size 0 means keep the size as it is } else { diff --git a/Modules/RSDatabase/Sources/RSDatabase/FMDatabase+Extras.swift b/Modules/RSDatabase/Sources/RSDatabase/FMDatabase+Extras.swift index ea523ff63..9cbe53b8b 100644 --- a/Modules/RSDatabase/Sources/RSDatabase/FMDatabase+Extras.swift +++ b/Modules/RSDatabase/Sources/RSDatabase/FMDatabase+Extras.swift @@ -20,7 +20,7 @@ public extension FMDatabase { return database } - func executeUpdateInTransaction(_ sql : String, withArgumentsIn parameters: [Any]? = nil) { + func executeUpdateInTransaction(_ sql: String, withArgumentsIn parameters: [Any]? = nil) { beginTransaction() guard executeUpdate(sql, withArgumentsIn: parameters) else { rollback() diff --git a/Modules/RSTree/Sources/RSTree/TreeController.swift b/Modules/RSTree/Sources/RSTree/TreeController.swift index e47e071c4..f8b275b97 100644 --- a/Modules/RSTree/Sources/RSTree/TreeController.swift +++ b/Modules/RSTree/Sources/RSTree/TreeController.swift @@ -12,7 +12,7 @@ import Foundation func treeController(treeController: TreeController, childNodesFor: Node) -> [Node]? } -public typealias NodeVisitBlock = (_ : Node) -> Void +public typealias NodeVisitBlock = (_: Node) -> Void @MainActor public final class TreeController { diff --git a/Modules/RSWeb/Sources/RSWeb/HTTPConditionalGetInfo.swift b/Modules/RSWeb/Sources/RSWeb/HTTPConditionalGetInfo.swift index 8753f2690..66e535ea3 100755 --- a/Modules/RSWeb/Sources/RSWeb/HTTPConditionalGetInfo.swift +++ b/Modules/RSWeb/Sources/RSWeb/HTTPConditionalGetInfo.swift @@ -27,7 +27,7 @@ nonisolated public struct HTTPConditionalGetInfo: Codable, Equatable { self.init(lastModified: lastModified, etag: etag) } - public init?(headers: [AnyHashable : Any]) { + public init?(headers: [AnyHashable: Any]) { let lastModified = headers[HTTPResponseHeader.lastModified] as? String let etag = headers[HTTPResponseHeader.etag] as? String self.init(lastModified: lastModified, etag: etag) diff --git a/Modules/RSWeb/Sources/RSWeb/HTTPLinkPagingInfo.swift b/Modules/RSWeb/Sources/RSWeb/HTTPLinkPagingInfo.swift index c3cbe1b24..cd2d05f07 100644 --- a/Modules/RSWeb/Sources/RSWeb/HTTPLinkPagingInfo.swift +++ b/Modules/RSWeb/Sources/RSWeb/HTTPLinkPagingInfo.swift @@ -29,7 +29,7 @@ public struct HTTPLinkPagingInfo { var dict: [String: String] = [:] links.forEach({ - let components = $0.components(separatedBy:"; ") + let components = $0.components(separatedBy: "; ") let page = components[0].trimmingCharacters(in: CharacterSet(charactersIn: " <>")) dict[components[1]] = page }) diff --git a/Modules/Secrets/Sources/Secrets/CredentialsManager.swift b/Modules/Secrets/Sources/Secrets/CredentialsManager.swift index caa13f0d8..45b5ec65e 100644 --- a/Modules/Secrets/Sources/Secrets/CredentialsManager.swift +++ b/Modules/Secrets/Sources/Secrets/CredentialsManager.swift @@ -84,7 +84,7 @@ public struct CredentialsManager { throw CredentialsError.unhandledError(status: status) } - guard let existingItem = item as? [String : Any], + guard let existingItem = item as? [String: Any], let secretData = existingItem[kSecValueData as String] as? Data, let secret = String(data: secretData, encoding: String.Encoding.utf8) else { return nil diff --git a/iOS/Article/WebViewController.swift b/iOS/Article/WebViewController.swift index 318080ecf..6d820ab89 100644 --- a/iOS/Article/WebViewController.swift +++ b/iOS/Article/WebViewController.swift @@ -403,7 +403,7 @@ extension WebViewController: WKNavigationDelegate { } if UIApplication.shared.canOpenURL(emailAddress) { - UIApplication.shared.open(emailAddress, options: [.universalLinksOnly : false], completionHandler: nil) + UIApplication.shared.open(emailAddress, options: [.universalLinksOnly: false], completionHandler: nil) } else { let alert = UIAlertController(title: NSLocalizedString("Error", comment: "Error"), message: NSLocalizedString("This device cannot send emails.", comment: "This device cannot send emails."), preferredStyle: .alert) alert.addAction(.init(title: NSLocalizedString("Dismiss", comment: "Dismiss"), style: .cancel, handler: nil)) @@ -413,7 +413,7 @@ extension WebViewController: WKNavigationDelegate { decisionHandler(.cancel) if UIApplication.shared.canOpenURL(url) { - UIApplication.shared.open(url, options: [.universalLinksOnly : false], completionHandler: nil) + UIApplication.shared.open(url, options: [.universalLinksOnly: false], completionHandler: nil) } } else { diff --git a/iOS/SceneCoordinator.swift b/iOS/SceneCoordinator.swift index 2ed9040e2..8280f20c3 100644 --- a/iOS/SceneCoordinator.swift +++ b/iOS/SceneCoordinator.swift @@ -1421,7 +1421,7 @@ struct FeedNode: Hashable, Sendable { do { try ArticleThemeImporter.importTheme(controller: rootSplitViewController, url: URL(fileURLWithPath: filename)) } catch { - NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error" : error]) + NotificationCenter.default.post(name: .didFailToImportThemeWithError, object: nil, userInfo: ["error": error]) } } @@ -1551,7 +1551,7 @@ private extension SceneCoordinator { addToFilterExceptionsIfNecessary(sidebarItem) addShadowTableToFilterExceptions() - rebuildBackingStores(completion: { + rebuildBackingStores(completion: { self.treeControllerDelegate.resetFilterExceptions() completion() }) @@ -2195,9 +2195,9 @@ private extension SceneCoordinator { // MARK: NSUserActivity - func handleSelectFeed(_ userInfo: [AnyHashable : Any]?) { + func handleSelectFeed(_ userInfo: [AnyHashable: Any]?) { guard let userInfo = userInfo, - let sidebarItemIDUserInfo = userInfo[UserInfoKey.sidebarItemID] as? [String : String], + let sidebarItemIDUserInfo = userInfo[UserInfoKey.sidebarItemID] as? [String: String], let sidebarItemID = SidebarItemIdentifier(userInfo: sidebarItemIDUserInfo) else { return } @@ -2210,7 +2210,7 @@ private extension SceneCoordinator { guard let smartFeed = SmartFeedsController.shared.find(by: sidebarItemID) else { return } markExpanded(SmartFeedsController.shared) - rebuildBackingStores(initialLoad: true, completion: { + rebuildBackingStores(initialLoad: true, completion: { self.treeControllerDelegate.resetFilterExceptions() if let indexPath = self.indexPathFor(smartFeed) { self.selectFeed(indexPath: indexPath) { @@ -2227,7 +2227,7 @@ private extension SceneCoordinator { markExpanded(account) - rebuildBackingStores(initialLoad: true, completion: { + rebuildBackingStores(initialLoad: true, completion: { self.treeControllerDelegate.resetFilterExceptions() if let folderNode = self.findFolderNode(folderName: folderName, beginningAt: accountNode), let indexPath = self.indexPathFor(folderNode) { @@ -2250,10 +2250,10 @@ private extension SceneCoordinator { } } - func handleReadArticle(_ userInfo: [AnyHashable : Any]?) { + func handleReadArticle(_ userInfo: [AnyHashable: Any]?) { guard let userInfo = userInfo else { return } - guard let articlePathUserInfo = userInfo[UserInfoKey.articlePath] as? [AnyHashable : Any], + guard let articlePathUserInfo = userInfo[UserInfoKey.articlePath] as? [AnyHashable: Any], let accountID = articlePathUserInfo[ArticlePathKey.accountID] as? String, let accountName = articlePathUserInfo[ArticlePathKey.accountName] as? String, let feedID = articlePathUserInfo[ArticlePathKey.feedID] as? String, @@ -2278,7 +2278,7 @@ private extension SceneCoordinator { } } - func restoreFeedSelection(_ userInfo: [AnyHashable : Any], accountID: String, feedID: String, articleID: String) -> Bool { + func restoreFeedSelection(_ userInfo: [AnyHashable: Any], accountID: String, feedID: String, articleID: String) -> Bool { guard let sidebarItemIDUserInfo = (userInfo[UserInfoKey.sidebarItemID] ?? userInfo[UserInfoKey.feedIdentifier]) as? [String: String], let sidebarItemID = SidebarItemIdentifier(userInfo: sidebarItemIDUserInfo) else { return false