From fb1b901efed596fb65a869d569499cdb7031b321 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Fri, 2 Jan 2026 11:42:12 -0800 Subject: [PATCH] Fix various SwiftLint warnings. --- .../Sidebar/SidebarViewController.swift | 4 +- .../Timeline/Cell/TimelineCellData.swift | 2 +- .../Timeline/TimelineViewController.swift | 38 +++++++-------- .../PreferencesWindowController.swift | 2 +- .../Sources/Account/URLRequest+Account.swift | 39 +++++++-------- .../ArticlesDatabase/ArticlesTable.swift | 22 ++++----- .../Sources/RSCore/AppKit/Keyboard.swift | 4 +- .../Sources/RSCore/SendToBlogEditorApp.swift | 2 +- .../RSCore/Sources/RSCore/String+RSCore.swift | 22 ++++----- .../Sources/RSCore/UIKit/UIFont+RSCore.swift | 2 +- .../Tests/RSCoreTests/Data+RSCoreTests.swift | 8 ++-- .../Tests/RSCoreTests/XCTestManifests.swift | 2 +- .../Sources/Swift/Feeds/ParsedItem.swift | 4 +- .../Sources/RSWeb/HTTPRequestHeader.swift | 2 +- .../Sources/RSWeb/HTTPResponseCode.swift | 2 +- .../RSWeb/Sources/RSWeb/String+RSWeb.swift | 25 +++++----- .../ReaderAPIAccountViewController.swift | 48 +++++++++---------- .../MainFeedCollectionViewController.swift | 2 +- .../Cells/MainTimelineCellData.swift | 2 +- .../MainTimelineViewController.swift | 2 +- 20 files changed, 115 insertions(+), 119 deletions(-) diff --git a/Mac/MainWindow/Sidebar/SidebarViewController.swift b/Mac/MainWindow/Sidebar/SidebarViewController.swift index 119275be4..e0f77c879 100644 --- a/Mac/MainWindow/Sidebar/SidebarViewController.swift +++ b/Mac/MainWindow/Sidebar/SidebarViewController.swift @@ -461,7 +461,7 @@ extension Notification.Name { } } - //MARK: - Node Manipulation + // MARK: - Node Manipulation func deleteNodes(_ nodes: [Node]) { let nodesToDelete = treeController.normalizedSelectedNodes(nodes) @@ -537,7 +537,7 @@ extension SidebarViewController: NSUserInterfaceValidations { } } -//MARK: - Private +// MARK: - Private private extension SidebarViewController { diff --git a/Mac/MainWindow/Timeline/Cell/TimelineCellData.swift b/Mac/MainWindow/Timeline/Cell/TimelineCellData.swift index 837f1bffe..3c5c70304 100644 --- a/Mac/MainWindow/Timeline/Cell/TimelineCellData.swift +++ b/Mac/MainWindow/Timeline/Cell/TimelineCellData.swift @@ -60,7 +60,7 @@ import Articles self.starred = article.status.starred } - init() { //Empty + init() { // Empty self.title = "" self.text = "" self.dateString = "" diff --git a/Mac/MainWindow/Timeline/TimelineViewController.swift b/Mac/MainWindow/Timeline/TimelineViewController.swift index e7042b867..5d2d0d0b0 100644 --- a/Mac/MainWindow/Timeline/TimelineViewController.swift +++ b/Mac/MainWindow/Timeline/TimelineViewController.swift @@ -996,27 +996,27 @@ extension TimelineViewController: NSTableViewDelegate { } switch edge { - case .leading: - let action = NSTableViewRowAction(style: .regular, title: article.status.read ? "Unread" : "Read") { (action, row) in - self.toggleArticleRead(article) - tableView.rowActionsVisible = false - } - action.image = article.status.read ? Assets.Images.swipeMarkUnread : Assets.Images.swipeMarkRead - return [action] - - case .trailing: - let action = NSTableViewRowAction(style: .regular, title: article.status.starred ? "Unstar" : "Star") { (action, row) in - self.toggleArticleStarred(article) - tableView.rowActionsVisible = false - } + case .leading: + let action = NSTableViewRowAction(style: .regular, title: article.status.read ? "Unread" : "Read") { (action, row) in + self.toggleArticleRead(article) + tableView.rowActionsVisible = false + } + action.image = article.status.read ? Assets.Images.swipeMarkUnread : Assets.Images.swipeMarkRead + return [action] + + case .trailing: + let action = NSTableViewRowAction(style: .regular, title: article.status.starred ? "Unstar" : "Star") { (action, row) in + self.toggleArticleStarred(article) + tableView.rowActionsVisible = false + } action.backgroundColor = Assets.Colors.star - action.image = article.status.starred ? Assets.Images.swipeMarkUnstarred : Assets.Images.swipeMarkStarred - return [action] - - @unknown default: - Self.logger.error("TimelineViewController: unknown edge \(edge.rawValue, privacy: .public)") + action.image = article.status.starred ? Assets.Images.swipeMarkUnstarred : Assets.Images.swipeMarkStarred + return [action] + + @unknown default: + Self.logger.error("TimelineViewController: unknown edge \(edge.rawValue, privacy: .public)") } - + return [] } } diff --git a/Mac/Preferences/PreferencesWindowController.swift b/Mac/Preferences/PreferencesWindowController.swift index 0e223c2a7..f943b55ce 100644 --- a/Mac/Preferences/PreferencesWindowController.swift +++ b/Mac/Preferences/PreferencesWindowController.swift @@ -175,7 +175,7 @@ private extension PreferencesWindowController { var updatedWindowFrame = windowFrame updatedWindowFrame.size.height = heightForWindow updatedWindowFrame.origin.y = windowOriginY - updatedWindowFrame.size.width = windowWidth //NSWidth(viewFrame) + updatedWindowFrame.size.width = windowWidth // NSWidth(viewFrame) var updatedViewFrame = viewFrame updatedViewFrame.origin = NSZeroPoint diff --git a/Modules/Account/Sources/Account/URLRequest+Account.swift b/Modules/Account/Sources/Account/URLRequest+Account.swift index 9e5ea78de..0ebada65b 100755 --- a/Modules/Account/Sources/Account/URLRequest+Account.swift +++ b/Modules/Account/Sources/Account/URLRequest+Account.swift @@ -14,10 +14,9 @@ import Secrets public extension URLRequest { init(url: URL, credentials: Credentials?, conditionalGet: HTTPConditionalGetInfo? = nil) { - self.init(url: url) - guard let credentials = credentials else { + guard let credentials else { return } @@ -33,15 +32,15 @@ public extension URLRequest { var postData = URLComponents() postData.queryItems = [ URLQueryItem(name: "username", value: credentials.username), - URLQueryItem(name: "password", value: credentials.secret), + URLQueryItem(name: "password", value: credentials.secret) ] httpBody = postData.enhancedPercentEncodedQuery?.data(using: .utf8) case .newsBlurSessionID: setValue("\(NewsBlurAPICaller.sessionIDCookieKey)=\(credentials.secret)", forHTTPHeaderField: "Cookie") httpShouldHandleCookies = true case .readerBasic: - setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") - httpMethod = "POST" + setValue("application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type") + httpMethod = "POST" var postData = URLComponents() postData.queryItems = [ URLQueryItem(name: "Email", value: credentials.username), @@ -49,22 +48,22 @@ public extension URLRequest { ] httpBody = postData.enhancedPercentEncodedQuery?.data(using: .utf8) case .readerAPIKey: - let auth = "GoogleLogin auth=\(credentials.secret)" - setValue(auth, forHTTPHeaderField: HTTPRequestHeader.authorization) + let auth = "GoogleLogin auth=\(credentials.secret)" + setValue(auth, forHTTPHeaderField: HTTPRequestHeader.authorization) case .oauthAccessToken: - let auth = "OAuth \(credentials.secret)" - setValue(auth, forHTTPHeaderField: "Authorization") + let auth = "OAuth \(credentials.secret)" + setValue(auth, forHTTPHeaderField: "Authorization") case .oauthAccessTokenSecret: - assertionFailure("Token secrets are used by OAuth1. Did you mean to use `OAuthSwift` instead of a URLRequest?") - break - case .oauthRefreshToken: - // While both access and refresh tokens are credentials, it seems the `Credentials` cases - // enumerates how the identity of the user can be proved rather than - // credentials-in-general, such as in this refresh token case, - // the authority to prove an identity. - assertionFailure("Refresh tokens are used to replace expired access tokens. Did you mean to use `accessToken` instead?") - break - } + assertionFailure("Token secrets are used by OAuth1. Did you mean to use `OAuthSwift` instead of a URLRequest?") + break + case .oauthRefreshToken: + // While both access and refresh tokens are credentials, it seems the `Credentials` cases + // enumerates how the identity of the user can be proved rather than + // credentials-in-general, such as in this refresh token case, + // the authority to prove an identity. + assertionFailure("Refresh tokens are used to replace expired access tokens. Did you mean to use `accessToken` instead?") + break + } guard let conditionalGet = conditionalGet else { return @@ -78,7 +77,5 @@ public extension URLRequest { if let etag = conditionalGet.etag { setValue(etag, forHTTPHeaderField: HTTPRequestHeader.ifNoneMatch) } - } - } diff --git a/Modules/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift b/Modules/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift index 7f00243d7..467c9906b 100644 --- a/Modules/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift +++ b/Modules/ArticlesDatabase/Sources/ArticlesDatabase/ArticlesTable.swift @@ -242,7 +242,7 @@ final class ArticlesTable: DatabaseTable, Sendable { articlesToDelete = Set
() } - self.callUpdateArticlesCompletionBlock(newArticles, updatedArticles, articlesToDelete, completion) //7 + self.callUpdateArticlesCompletionBlock(newArticles, updatedArticles, articlesToDelete, completion) // 7 self.addArticlesToCache(newArticles) self.addArticlesToCache(updatedArticles) @@ -298,29 +298,29 @@ final class ArticlesTable: DatabaseTable, Sendable { articleIDs.formUnion(parsedItems.articleIDs()) } - let (statusesDictionary, _) = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, read, database) //1 + let (statusesDictionary, _) = self.statusesTable.ensureStatusesForArticleIDs(articleIDs, read, database) // 1 assert(statusesDictionary.count == articleIDs.count) - let allIncomingArticles = Article.articlesWithFeedIDsAndItems(feedIDsAndItems, self.accountID, statusesDictionary) //2 + let allIncomingArticles = Article.articlesWithFeedIDsAndItems(feedIDsAndItems, self.accountID, statusesDictionary) // 2 if allIncomingArticles.isEmpty { self.callUpdateArticlesCompletionBlock(nil, nil, nil, completion) return } - let incomingArticles = self.filterIncomingArticles(allIncomingArticles) //3 + let incomingArticles = self.filterIncomingArticles(allIncomingArticles) // 3 if incomingArticles.isEmpty { self.callUpdateArticlesCompletionBlock(nil, nil, nil, completion) return } let incomingArticleIDs = incomingArticles.articleIDs() - let fetchedArticles = self.fetchArticles(articleIDs: incomingArticleIDs, database) //4 + let fetchedArticles = self.fetchArticles(articleIDs: incomingArticleIDs, database) // 4 let fetchedArticlesDictionary = fetchedArticles.dictionary() - let newArticles = self.findAndSaveNewArticles(incomingArticles, fetchedArticlesDictionary, database) //5 - let updatedArticles = self.findAndSaveUpdatedArticles(incomingArticles, fetchedArticlesDictionary, database) //6 + let newArticles = self.findAndSaveNewArticles(incomingArticles, fetchedArticlesDictionary, database) // + let updatedArticles = self.findAndSaveUpdatedArticles(incomingArticles, fetchedArticlesDictionary, database) // 6 - self.callUpdateArticlesCompletionBlock(newArticles, updatedArticles, nil, completion) //7 + self.callUpdateArticlesCompletionBlock(newArticles, updatedArticles, nil, completion) // 7 self.addArticlesToCache(newArticles) self.addArticlesToCache(updatedArticles) @@ -987,7 +987,7 @@ nonisolated private extension ArticlesTable { return newArticles.isEmpty ? nil : newArticles } - func findAndSaveNewArticles(_ incomingArticles: Set
, _ fetchedArticlesDictionary: [String: Article], _ database: FMDatabase) -> Set
? { //5 + func findAndSaveNewArticles(_ incomingArticles: Set
, _ fetchedArticlesDictionary: [String: Article], _ database: FMDatabase) -> Set
? { // 5 guard let newArticles = findNewArticles(incomingArticles, fetchedArticlesDictionary) else { return nil } @@ -1032,7 +1032,7 @@ nonisolated private extension ArticlesTable { } func findUpdatedArticles(_ incomingArticles: Set
, _ fetchedArticlesDictionary: [String: Article]) -> Set
? { - let updatedArticles = incomingArticles.filter{ (incomingArticle) -> Bool in //6 + let updatedArticles = incomingArticles.filter{ (incomingArticle) -> Bool in // 6 if let existingArticle = fetchedArticlesDictionary[incomingArticle.articleID] { if existingArticle != incomingArticle { return true @@ -1044,7 +1044,7 @@ nonisolated private extension ArticlesTable { return updatedArticles.isEmpty ? nil : updatedArticles } - func findAndSaveUpdatedArticles(_ incomingArticles: Set
, _ fetchedArticlesDictionary: [String: Article], _ database: FMDatabase) -> Set
? { //6 + func findAndSaveUpdatedArticles(_ incomingArticles: Set
, _ fetchedArticlesDictionary: [String: Article], _ database: FMDatabase) -> Set
? { // 6 guard let updatedArticles = findUpdatedArticles(incomingArticles, fetchedArticlesDictionary) else { return nil } diff --git a/Modules/RSCore/Sources/RSCore/AppKit/Keyboard.swift b/Modules/RSCore/Sources/RSCore/AppKit/Keyboard.swift index 6cdb03b18..bcbcc1d5c 100644 --- a/Modules/RSCore/Sources/RSCore/AppKit/Keyboard.swift +++ b/Modules/RSCore/Sources/RSCore/AppKit/Keyboard.swift @@ -121,8 +121,8 @@ public struct KeyboardKey: Hashable, Sendable { integerValue = KeyboardKey.deleteKeyCode case "[deletefunction]": integerValue = NSDeleteFunctionKey - case "[tab]": - integerValue = NSTabCharacter + case "[tab]": + integerValue = NSTabCharacter default: guard let unwrappedIntegerValue = s.keyboardIntegerValue else { return nil diff --git a/Modules/RSCore/Sources/RSCore/SendToBlogEditorApp.swift b/Modules/RSCore/Sources/RSCore/SendToBlogEditorApp.swift index 0aacea5e2..6e2f7e065 100644 --- a/Modules/RSCore/Sources/RSCore/SendToBlogEditorApp.swift +++ b/Modules/RSCore/Sources/RSCore/SendToBlogEditorApp.swift @@ -12,7 +12,7 @@ import Foundation /// [send-to-blog-editor Apple Events API](http://ranchero.com/netnewswire/developers/externalinterface)\. @MainActor public struct SendToBlogEditorApp { - ///The target descriptor of the application. + /// The target descriptor of the application. /// /// The easiest way to get this is probably `UserApp.targetDescriptor` or `NSAppleEventDescriptor(runningApplication:)`. /// diff --git a/Modules/RSCore/Sources/RSCore/String+RSCore.swift b/Modules/RSCore/Sources/RSCore/String+RSCore.swift index 4995334dd..f096f63f3 100644 --- a/Modules/RSCore/Sources/RSCore/String+RSCore.swift +++ b/Modules/RSCore/Sources/RSCore/String+RSCore.swift @@ -262,19 +262,19 @@ public extension String { for char in self { switch char { - case "&": - escaped.append("&") - case "<": - escaped.append("<") - case ">": - escaped.append(">") - case "\"": - escaped.append(""") - default: - escaped.append(char) + case "&": + escaped.append("&") + case "<": + escaped.append("<") + case ">": + escaped.append(">") + case "\"": + escaped.append(""") + default: + escaped.append(char) } } - + return escaped } diff --git a/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift b/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift index ec68e3fd2..910907d48 100644 --- a/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift +++ b/Modules/RSCore/Sources/RSCore/UIKit/UIFont+RSCore.swift @@ -14,7 +14,7 @@ extension 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 + return UIFont(descriptor: descriptor, size: 0) // size 0 means keep the size as it is } else { return self } diff --git a/Modules/RSCore/Tests/RSCoreTests/Data+RSCoreTests.swift b/Modules/RSCore/Tests/RSCoreTests/Data+RSCoreTests.swift index fa061a732..92f352705 100644 --- a/Modules/RSCore/Tests/RSCoreTests/Data+RSCoreTests.swift +++ b/Modules/RSCore/Tests/RSCoreTests/Data+RSCoreTests.swift @@ -10,7 +10,7 @@ import XCTest import Foundation @testable import RSCore -//final class Data_RSCoreTests: XCTestCase { +// final class Data_RSCoreTests: XCTestCase { // var bigHTML: String! // // var pngData: Data! @@ -125,10 +125,10 @@ import Foundation // // } // -//} +// } // Tests to compare the result of Data+RSCore with the old Objective-C versions. -//extension Data_RSCoreTests { +// extension Data_RSCoreTests { // // func testCompare_isProbablyHTML() { // let noLT = "html body".data(using: .utf8)! @@ -186,4 +186,4 @@ import Foundation // // } // -//} +// } diff --git a/Modules/RSCore/Tests/RSCoreTests/XCTestManifests.swift b/Modules/RSCore/Tests/RSCoreTests/XCTestManifests.swift index 4f81fdd24..d0653dea8 100644 --- a/Modules/RSCore/Tests/RSCoreTests/XCTestManifests.swift +++ b/Modules/RSCore/Tests/RSCoreTests/XCTestManifests.swift @@ -3,7 +3,7 @@ import XCTest #if !canImport(ObjectiveC) public func allTests() -> [XCTestCaseEntry] { return [ - testCase(RSCoreTests.allTests), + testCase(RSCoreTests.allTests) ] } #endif diff --git a/Modules/RSParser/Sources/Swift/Feeds/ParsedItem.swift b/Modules/RSParser/Sources/Swift/Feeds/ParsedItem.swift index 035d3e17d..bd314dfd1 100644 --- a/Modules/RSParser/Sources/Swift/Feeds/ParsedItem.swift +++ b/Modules/RSParser/Sources/Swift/Feeds/ParsedItem.swift @@ -10,8 +10,8 @@ import Foundation import RSMarkdown public struct ParsedItem: Hashable, Sendable { - public let syncServiceID: String? //Nil when not syncing - public let uniqueID: String //RSS guid, for instance; may be calculated + public let syncServiceID: String? // Nil when not syncing + public let uniqueID: String // RSS guid, for instance; may be calculated public let feedURL: String public let url: String? public let externalURL: String? diff --git a/Modules/RSWeb/Sources/RSWeb/HTTPRequestHeader.swift b/Modules/RSWeb/Sources/RSWeb/HTTPRequestHeader.swift index 8da0be40c..765c3aaba 100755 --- a/Modules/RSWeb/Sources/RSWeb/HTTPRequestHeader.swift +++ b/Modules/RSWeb/Sources/RSWeb/HTTPRequestHeader.swift @@ -17,5 +17,5 @@ nonisolated public struct HTTPRequestHeader { // Conditional GET public static let ifModifiedSince = "If-Modified-Since" - public static let ifNoneMatch = "If-None-Match" //Etag + public static let ifNoneMatch = "If-None-Match" // Etag } diff --git a/Modules/RSWeb/Sources/RSWeb/HTTPResponseCode.swift b/Modules/RSWeb/Sources/RSWeb/HTTPResponseCode.swift index 6e9bf46e7..4847bd0a7 100755 --- a/Modules/RSWeb/Sources/RSWeb/HTTPResponseCode.swift +++ b/Modules/RSWeb/Sources/RSWeb/HTTPResponseCode.swift @@ -13,7 +13,7 @@ public struct HTTPResponseCode { // http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html // Not an enum because the main interest is the actual values. - public static let responseContinue = 100 //"continue" is a language keyword, hence the weird name + public static let responseContinue = 100 // "continue" is a language keyword, hence the weird name public static let switchingProtocols = 101 public static let OK = 200 diff --git a/Modules/RSWeb/Sources/RSWeb/String+RSWeb.swift b/Modules/RSWeb/Sources/RSWeb/String+RSWeb.swift index 4819b27e6..d2fbc0ed9 100644 --- a/Modules/RSWeb/Sources/RSWeb/String+RSWeb.swift +++ b/Modules/RSWeb/Sources/RSWeb/String+RSWeb.swift @@ -18,22 +18,21 @@ nonisolated public extension String { for char in self { switch char { - case "&": - escaped.append("&") - case "<": - escaped.append("<") - case ">": - escaped.append(">") - case "\"": - escaped.append(""") - case "'": - escaped.append("'") - default: - escaped.append(char) + case "&": + escaped.append("&") + case "<": + escaped.append("<") + case ">": + escaped.append(">") + case "\"": + escaped.append(""") + case "'": + escaped.append("'") + default: + escaped.append(char) } } return escaped } - } diff --git a/iOS/Account/ReaderAPIAccountViewController.swift b/iOS/Account/ReaderAPIAccountViewController.swift index 61a15c151..ae3606673 100644 --- a/iOS/Account/ReaderAPIAccountViewController.swift +++ b/iOS/Account/ReaderAPIAccountViewController.swift @@ -71,20 +71,20 @@ final class ReaderAPIAccountViewController: UITableViewController { private func setupFooter() { switch accountType { - case .bazQux: - footerLabel.text = NSLocalizedString("Sign in to your BazQux account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a BazQux account?", comment: "BazQux") - signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "BazQux SignUp"), for: .normal) - case .inoreader: - footerLabel.text = NSLocalizedString("Sign in to your Inoreader account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have an Inoreader account?", comment: "Inoreader") - signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "Inoreader SignUp"), for: .normal) - case .theOldReader: - footerLabel.text = NSLocalizedString("Sign in to your The Old Reader account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a The Old Reader account?", comment: "TOR") - signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "TOR SignUp"), for: .normal) - case .freshRSS: - footerLabel.text = NSLocalizedString("Sign in to your FreshRSS instance and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have an FreshRSS instance?", comment: "FreshRSS") - signUpButton.setTitle(NSLocalizedString("Find Out More", comment: "FreshRSS SignUp"), for: .normal) - default: - return + case .bazQux: + footerLabel.text = NSLocalizedString("Sign in to your BazQux account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a BazQux account?", comment: "BazQux") + signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "BazQux SignUp"), for: .normal) + case .inoreader: + footerLabel.text = NSLocalizedString("Sign in to your Inoreader account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have an Inoreader account?", comment: "Inoreader") + signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "Inoreader SignUp"), for: .normal) + case .theOldReader: + footerLabel.text = NSLocalizedString("Sign in to your The Old Reader account and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have a The Old Reader account?", comment: "TOR") + signUpButton.setTitle(NSLocalizedString("Sign Up Here", comment: "TOR SignUp"), for: .normal) + case .freshRSS: + footerLabel.text = NSLocalizedString("Sign in to your FreshRSS instance and sync your feeds across your devices. Your username and password will be encrypted and stored in Keychain.\n\nDon’t have an FreshRSS instance?", comment: "FreshRSS") + signUpButton.setTitle(NSLocalizedString("Find Out More", comment: "FreshRSS SignUp"), for: .normal) + default: + return } } @@ -246,16 +246,16 @@ final class ReaderAPIAccountViewController: UITableViewController { @IBAction func signUpWithProvider(_ sender: Any) { var url: URL! switch accountType { - case .bazQux: - url = URL(string: "https://bazqux.com")! - case .inoreader: - url = URL(string: "https://www.inoreader.com")! - case .theOldReader: - url = URL(string: "https://theoldreader.com")! - case .freshRSS: - url = URL(string: "https://freshrss.org")! - default: - return + case .bazQux: + url = URL(string: "https://bazqux.com")! + case .inoreader: + url = URL(string: "https://www.inoreader.com")! + case .theOldReader: + url = URL(string: "https://theoldreader.com")! + case .freshRSS: + url = URL(string: "https://freshrss.org")! + default: + return } let safari = SFSafariViewController(url: url) safari.modalPresentationStyle = .currentContext diff --git a/iOS/MainFeed/MainFeedCollectionViewController.swift b/iOS/MainFeed/MainFeedCollectionViewController.swift index 3760e8d60..5082fd89a 100644 --- a/iOS/MainFeed/MainFeedCollectionViewController.swift +++ b/iOS/MainFeed/MainFeedCollectionViewController.swift @@ -516,7 +516,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab } func configureCellsForRepresentedObject(_ representedObject: AnyObject) { - //applyToCellsForRepresentedObject(representedObject, configure) + // applyToCellsForRepresentedObject(representedObject, configure) } func applyToCellsForRepresentedObject(_ representedObject: AnyObject, _ completion: (MainFeedCollectionViewCell, IndexPath) -> Void) { diff --git a/iOS/MainTimeline/Cells/MainTimelineCellData.swift b/iOS/MainTimeline/Cells/MainTimelineCellData.swift index 6a4fbf63f..faaddf7f7 100644 --- a/iOS/MainTimeline/Cells/MainTimelineCellData.swift +++ b/iOS/MainTimeline/Cells/MainTimelineCellData.swift @@ -66,7 +66,7 @@ import Articles } - init() { //Empty + init() { // Empty self.title = "" self.attributedTitle = NSAttributedString() self.summary = "" diff --git a/iOS/MainTimeline/MainTimelineViewController.swift b/iOS/MainTimeline/MainTimelineViewController.swift index c24be2fa5..e2c963678 100644 --- a/iOS/MainTimeline/MainTimelineViewController.swift +++ b/iOS/MainTimeline/MainTimelineViewController.swift @@ -217,7 +217,7 @@ final class MainTimelineViewController: UITableViewController, UndoableCommandRu if navigationController?.navigationBar.isHidden ?? false { navigationController?.navigationBar.alpha = 0 } - //navigationItem.subtitle = "" // don't inherit feeds subtitle on push + // navigationItem.subtitle = "" // don't inherit feeds subtitle on push updateNavigationBarTitle(coordinator?.timelineFeed?.nameForDisplay ?? "") coordinator?.updateNavigationBarSubtitles(nil) }