Fix lint issues.

This commit is contained in:
Brent Simmons
2025-01-23 22:17:28 -08:00
parent ec88ebee22
commit ae2b017ae0
10 changed files with 47 additions and 26 deletions

View File

@@ -56,7 +56,20 @@ private extension SendToMarsEditCommand {
let body = article.contentHTML ?? article.contentText ?? article.summary
let authorName = article.authors?.first?.name
let sender = SendToBlogEditorApp(targetDescriptor: targetDescriptor, title: article.title, body: body, summary: article.summary, link: article.externalLink, permalink: article.link, subject: nil, creator: authorName, commentsURL: nil, guid: article.uniqueID, sourceName: article.feed?.nameForDisplay, sourceHomeURL: article.feed?.homePageURL, sourceFeedURL: article.feed?.url)
let sender = SendToBlogEditorApp(
targetDescriptor: targetDescriptor,
title: article.title,
body: body,
summary: article.summary,
link: article.externalLink,
permalink: article.link,
subject: nil,
creator: authorName, commentsURL: nil,
guid: article.uniqueID,
sourceName: article.feed?.nameForDisplay,
sourceHomeURL: article.feed?.homePageURL,
sourceFeedURL: article.feed?.url
)
sender.send()
}

View File

@@ -22,7 +22,7 @@ final class SendToMicroBlogCommand: SendToCommand {
func canSendObject(_ object: Any?, selectedText: String?) -> Bool {
microBlogApp.updateStatus()
guard microBlogApp.existsOnDisk, let article = (object as? ArticlePasteboardWriter)?.article, let _ = article.preferredLink else {
guard microBlogApp.existsOnDisk, let article = (object as? ArticlePasteboardWriter)?.article, article.preferredLink != nil else {
return false
}