mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-01 09:50:16 +00:00
Fix SwiftLint issues.
This commit is contained in:
1 parent
fd547da76e
commit
820dd504f1
14 files changed
+54
-61
No files matched your search
@@ -748,7 +748,6 @@ public enum FetchType {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
func addFolderToTree(_ folder: Folder) {
|
||||
folders!.insert(folder)
|
||||
postChildrenDidChangeNotification()
|
||||
|
||||
@@ -15,7 +15,7 @@ import ArticlesDatabase
|
||||
import ErrorLog
|
||||
|
||||
@MainActor public final class AccountManager: UnreadCountProvider {
|
||||
|
||||
|
||||
public static var shared = AccountManager()
|
||||
|
||||
public static let netNewsWireNewsURL = "https://netnewswire.blog/feed.xml"
|
||||
@@ -661,4 +661,3 @@ private struct AccountSpecifier {
|
||||
return NSString(string: folderPath).appendingPathComponent(accountDataFileName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,6 @@ public extension CloudKitZone {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Reset the change token used to determine what point in time we are doing changes fetches
|
||||
func resetChangeToken() {
|
||||
Self.logger.debug("CloudKitZone: resetChangeToken \(self.zoneID.zoneName, privacy: .public)")
|
||||
@@ -854,7 +853,7 @@ public extension CloudKitZone {
|
||||
}
|
||||
}
|
||||
|
||||
let _ = try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<[CKRecord], Error>) in
|
||||
_ = try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<[CKRecord], Error>) in
|
||||
query(ckQuery, desiredKeys: desiredKeys, pageHandler: wrappedHandler, completion: { result in
|
||||
switch result {
|
||||
case .success(let records):
|
||||
|
||||
@@ -52,7 +52,7 @@ public actor ErrorLogDatabase {
|
||||
let sourceID = notification.userInfo?[ErrorLogUserInfoKey.sourceID] as? Int else {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
let operation = notification.userInfo?[ErrorLogUserInfoKey.operation] as? String ?? ""
|
||||
let fileName = notification.userInfo?[ErrorLogUserInfoKey.fileName] as? String ?? ""
|
||||
let functionName = notification.userInfo?[ErrorLogUserInfoKey.functionName] as? String ?? ""
|
||||
|
||||
@@ -16,7 +16,7 @@ public struct Platform {
|
||||
nonisolated public static var deviceHasiCloudAccount: Bool {
|
||||
FileManager.default.ubiquityIdentityToken != nil
|
||||
}
|
||||
|
||||
|
||||
/// Returns true if the app is currently running unit tests.
|
||||
nonisolated public static var isRunningUnitTests: Bool {
|
||||
return _isRunningUnitTests
|
||||
|
||||
@@ -420,4 +420,3 @@ private final class AtomAuthor {
|
||||
return ParsedAuthor(name: name, url: url, avatarURL: nil, emailAddress: emailAddress)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ final class RSSItem {
|
||||
// promote summary to body and drop summary.
|
||||
var contentHTML = body
|
||||
var itemSummary = summary
|
||||
if (contentHTML == nil || contentHTML?.isEmpty == true), let s = itemSummary, !s.isEmpty {
|
||||
if contentHTML == nil || contentHTML?.isEmpty == true, let s = itemSummary, !s.isEmpty {
|
||||
contentHTML = s
|
||||
itemSummary = nil
|
||||
}
|
||||
|
||||
@@ -50,53 +50,53 @@ public enum DateParser {
|
||||
private static let utcPacked: UInt64 = packASCII("utc")
|
||||
|
||||
private static let timeZoneOffsets: [UInt64: Int] = [
|
||||
packASCII("pdt"): offset(-7), packASCII("pst"): offset(-8),
|
||||
packASCII("est"): offset(-5), packASCII("edt"): offset(-4),
|
||||
packASCII("mdt"): offset(-6), packASCII("mst"): offset(-7),
|
||||
packASCII("cst"): offset(-6), packASCII("cdt"): offset(-5),
|
||||
packASCII("act"): offset(-8), packASCII("aft"): offset(4, 30),
|
||||
packASCII("amt"): offset(4), packASCII("art"): offset(-3),
|
||||
packASCII("ast"): offset(3), packASCII("azt"): offset(4),
|
||||
packASCII("bit"): offset(-12), packASCII("bdt"): offset(8),
|
||||
packASCII("acst"): offset(9, 30), packASCII("aest"): offset(10),
|
||||
packASCII("akst"): offset(-9), packASCII("amst"): offset(5),
|
||||
packASCII("awst"): offset(8), packASCII("azost"): offset(-1),
|
||||
packASCII("biot"): offset(6), packASCII("brt"): offset(-3),
|
||||
packASCII("bst"): offset(6), packASCII("btt"): offset(6),
|
||||
packASCII("cat"): offset(2), packASCII("cct"): offset(6, 30),
|
||||
packASCII("cet"): offset(1), packASCII("cest"): offset(2),
|
||||
packASCII("pdt"): offset(-7), packASCII("pst"): offset(-8),
|
||||
packASCII("est"): offset(-5), packASCII("edt"): offset(-4),
|
||||
packASCII("mdt"): offset(-6), packASCII("mst"): offset(-7),
|
||||
packASCII("cst"): offset(-6), packASCII("cdt"): offset(-5),
|
||||
packASCII("act"): offset(-8), packASCII("aft"): offset(4, 30),
|
||||
packASCII("amt"): offset(4), packASCII("art"): offset(-3),
|
||||
packASCII("ast"): offset(3), packASCII("azt"): offset(4),
|
||||
packASCII("bit"): offset(-12), packASCII("bdt"): offset(8),
|
||||
packASCII("acst"): offset(9, 30), packASCII("aest"): offset(10),
|
||||
packASCII("akst"): offset(-9), packASCII("amst"): offset(5),
|
||||
packASCII("awst"): offset(8), packASCII("azost"): offset(-1),
|
||||
packASCII("biot"): offset(6), packASCII("brt"): offset(-3),
|
||||
packASCII("bst"): offset(6), packASCII("btt"): offset(6),
|
||||
packASCII("cat"): offset(2), packASCII("cct"): offset(6, 30),
|
||||
packASCII("cet"): offset(1), packASCII("cest"): offset(2),
|
||||
packASCII("chast"): offset(12, 45), packASCII("chst"): offset(10),
|
||||
packASCII("cist"): offset(-8), packASCII("ckt"): offset(-10),
|
||||
packASCII("clt"): offset(-4), packASCII("clst"): offset(-3),
|
||||
packASCII("cot"): offset(-5), packASCII("cost"): offset(-4),
|
||||
packASCII("cvt"): offset(-1), packASCII("cxt"): offset(7),
|
||||
packASCII("east"): offset(-6), packASCII("eat"): offset(3),
|
||||
packASCII("ect"): offset(-4), packASCII("eest"): offset(3),
|
||||
packASCII("eet"): offset(2), packASCII("fjt"): offset(12),
|
||||
packASCII("fkst"): offset(-4), packASCII("galt"): offset(-6),
|
||||
packASCII("get"): offset(4), packASCII("gft"): offset(-3),
|
||||
packASCII("gilt"): offset(7), packASCII("git"): offset(-9),
|
||||
packASCII("gst"): offset(-2), packASCII("gyt"): offset(-4),
|
||||
packASCII("hast"): offset(-10), packASCII("hkt"): offset(8),
|
||||
packASCII("hmt"): offset(5), packASCII("irkt"): offset(8),
|
||||
packASCII("irst"): offset(3, 30), packASCII("ist"): offset(2),
|
||||
packASCII("jst"): offset(9), packASCII("krat"): offset(7),
|
||||
packASCII("kst"): offset(9), packASCII("lhst"): offset(10, 30),
|
||||
packASCII("lint"): offset(14), packASCII("magt"): offset(11),
|
||||
packASCII("mit"): offset(-9, 30), packASCII("msk"): offset(3),
|
||||
packASCII("mut"): offset(4), packASCII("ndt"): offset(-2, 30),
|
||||
packASCII("nft"): offset(11, 30), packASCII("npt"): offset(5, 45),
|
||||
packASCII("nt"): offset(-3, 30), packASCII("omst"): offset(6),
|
||||
packASCII("pett"): offset(12), packASCII("phot"): offset(13),
|
||||
packASCII("pkt"): offset(5), packASCII("ret"): offset(4),
|
||||
packASCII("samt"): offset(4), packASCII("sast"): offset(2),
|
||||
packASCII("sbt"): offset(11), packASCII("sct"): offset(4),
|
||||
packASCII("slt"): offset(5, 30), packASCII("sst"): offset(8),
|
||||
packASCII("taht"): offset(-10), packASCII("tha"): offset(7),
|
||||
packASCII("uyt"): offset(-3), packASCII("uyst"): offset(-2),
|
||||
packASCII("vet"): offset(-4, 30), packASCII("vlat"): offset(10),
|
||||
packASCII("wat"): offset(1), packASCII("wet"): offset(0),
|
||||
packASCII("west"): offset(1), packASCII("yakt"): offset(9),
|
||||
packASCII("cist"): offset(-8), packASCII("ckt"): offset(-10),
|
||||
packASCII("clt"): offset(-4), packASCII("clst"): offset(-3),
|
||||
packASCII("cot"): offset(-5), packASCII("cost"): offset(-4),
|
||||
packASCII("cvt"): offset(-1), packASCII("cxt"): offset(7),
|
||||
packASCII("east"): offset(-6), packASCII("eat"): offset(3),
|
||||
packASCII("ect"): offset(-4), packASCII("eest"): offset(3),
|
||||
packASCII("eet"): offset(2), packASCII("fjt"): offset(12),
|
||||
packASCII("fkst"): offset(-4), packASCII("galt"): offset(-6),
|
||||
packASCII("get"): offset(4), packASCII("gft"): offset(-3),
|
||||
packASCII("gilt"): offset(7), packASCII("git"): offset(-9),
|
||||
packASCII("gst"): offset(-2), packASCII("gyt"): offset(-4),
|
||||
packASCII("hast"): offset(-10), packASCII("hkt"): offset(8),
|
||||
packASCII("hmt"): offset(5), packASCII("irkt"): offset(8),
|
||||
packASCII("irst"): offset(3, 30), packASCII("ist"): offset(2),
|
||||
packASCII("jst"): offset(9), packASCII("krat"): offset(7),
|
||||
packASCII("kst"): offset(9), packASCII("lhst"): offset(10, 30),
|
||||
packASCII("lint"): offset(14), packASCII("magt"): offset(11),
|
||||
packASCII("mit"): offset(-9, 30), packASCII("msk"): offset(3),
|
||||
packASCII("mut"): offset(4), packASCII("ndt"): offset(-2, 30),
|
||||
packASCII("nft"): offset(11, 30), packASCII("npt"): offset(5, 45),
|
||||
packASCII("nt"): offset(-3, 30), packASCII("omst"): offset(6),
|
||||
packASCII("pett"): offset(12), packASCII("phot"): offset(13),
|
||||
packASCII("pkt"): offset(5), packASCII("ret"): offset(4),
|
||||
packASCII("samt"): offset(4), packASCII("sast"): offset(2),
|
||||
packASCII("sbt"): offset(11), packASCII("sct"): offset(4),
|
||||
packASCII("slt"): offset(5, 30), packASCII("sst"): offset(8),
|
||||
packASCII("taht"): offset(-10), packASCII("tha"): offset(7),
|
||||
packASCII("uyt"): offset(-3), packASCII("uyst"): offset(-2),
|
||||
packASCII("vet"): offset(-4, 30), packASCII("vlat"): offset(10),
|
||||
packASCII("wat"): offset(1), packASCII("wet"): offset(0),
|
||||
packASCII("west"): offset(1), packASCII("yakt"): offset(9),
|
||||
packASCII("yekt"): offset(5)
|
||||
]
|
||||
}
|
||||
|
||||
@@ -316,7 +316,7 @@ private extension XMLSAXParser {
|
||||
let incomingLocal = utf8[localRange]
|
||||
|
||||
// Find matching open element (scan from top).
|
||||
var matchIndex: Int? = nil
|
||||
var matchIndex: Int?
|
||||
for i in elementStack.indices.reversed() {
|
||||
let entry = elementStack[i]
|
||||
if entry.namespace.prefix == incomingPrefix && bytesEqual(entry.localNameSlice, incomingLocal) {
|
||||
|
||||
@@ -91,4 +91,3 @@ import RSParser
|
||||
#expect(feedType(d, isPartialData: true) == .unknown)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,4 +199,3 @@ struct ArticlePathKey {
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ private extension ArticleSorter {
|
||||
// MARK: - Sorting
|
||||
|
||||
@MainActor extension Article {
|
||||
|
||||
|
||||
fileprivate var sortableFeedName: String {
|
||||
feed?.nameForDisplay ?? ""
|
||||
}
|
||||
|
||||
@@ -809,7 +809,7 @@ final class MainFeedCollectionViewController: UICollectionViewController, Undoab
|
||||
}
|
||||
alertController.addAction(addFolderAction)
|
||||
}
|
||||
|
||||
|
||||
alertController.addAction(cancelAction)
|
||||
|
||||
alertController.popoverPresentationController?.barButtonItem = sender
|
||||
|
||||
@@ -14,7 +14,6 @@ final class RefreshProgressView: UIView {
|
||||
private let progressView = UIProgressView(progressViewStyle: .default)
|
||||
private let label = UILabel()
|
||||
|
||||
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setup()
|
||||
|
||||
Reference in new issue
Block a user