mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 09:11:13 +01:00
Continue work on send to Micro.blog.
This commit is contained in:
parent
790a6f6d2d
commit
32dae64b83
@ -24,13 +24,7 @@ final class SendToMicroBlogCommand: SendToCommand {
|
||||
|
||||
func canSendObject(_ object: Any?, selectedText: String?) -> Bool {
|
||||
|
||||
guard appExists else {
|
||||
return false
|
||||
}
|
||||
guard let article = object as? Article else {
|
||||
return false
|
||||
}
|
||||
guard let _ = article.preferredLink else {
|
||||
guard appExists, let article = object as? Article, let _ = article.preferredLink else {
|
||||
return false
|
||||
}
|
||||
|
||||
@ -60,6 +54,9 @@ final class SendToMicroBlogCommand: SendToCommand {
|
||||
s = "[" + s + "](" + link + ")"
|
||||
}
|
||||
}
|
||||
else if let link = article.preferredLink {
|
||||
s = link
|
||||
}
|
||||
|
||||
guard let encodedString = s.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user