Fix lint issues.

This commit is contained in:
Brent Simmons
2025-01-24 22:55:39 -08:00
parent cc4914a7ef
commit cc34209738
17 changed files with 88 additions and 81 deletions

View File

@@ -153,28 +153,28 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
}
@objc(accountType)
var accountType: OSType {
var osType: String = ""
switch self.account.type {
case .onMyMac:
osType = "Locl"
var accountType: OSType {
var osType: String = ""
switch self.account.type {
case .onMyMac:
osType = "Locl"
case .cloudKit:
osType = "Clkt"
case .feedly:
osType = "Fdly"
case .feedbin:
osType = "Fdbn"
case .newsBlur:
osType = "NBlr"
osType = "Clkt"
case .feedly:
osType = "Fdly"
case .feedbin:
osType = "Fdbn"
case .newsBlur:
osType = "NBlr"
case .freshRSS:
osType = "Frsh"
osType = "Frsh"
case .inoreader:
osType = "Inrd"
osType = "Inrd"
case .bazQux:
osType = "Bzqx"
osType = "Bzqx"
case .theOldReader:
osType = "Tord"
}
return osType.fourCharCode
}
osType = "Tord"
}
return osType.fourCharCode
}
}

View File

@@ -24,7 +24,7 @@ protocol AppDelegateAppleEvents {
func getURL(_ event: NSAppleEventDescriptor, _ withReplyEvent: NSAppleEventDescriptor)
}
protocol ScriptingAppDelegate {
protocol ScriptingAppDelegate: AnyObject {
var scriptingCurrentArticle: Article? {get}
var scriptingSelectedArticles: [Article] {get}
var scriptingMainWindowController: ScriptingMainWindowController? {get}
@@ -171,14 +171,14 @@ class NetNewsWireExistsCommand: NSExistsCommand {
// to be another object type. e.g., 'permalink of the current article' parses as
// <property> of <property> of <top level object>
// cocoa would send the top level object (the app) a doesExist message for a nested property, and
// it errors out because it doesn't know how to handle that
// it errors out because it doesn't know how to handle that`
// What we do instead is simply see if the defaultImplementation errors, and if it does, the object
// must not exist. Otherwise, we return the result of the defaultImplementation
// 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) }
guard let result = super.performDefaultImplementation() else { return NSNumber(value: false) }
return result
}
}