mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-25 17:12:23 +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 {
|
func canSendObject(_ object: Any?, selectedText: String?) -> Bool {
|
||||||
|
|
||||||
guard appExists else {
|
guard appExists, let article = object as? Article, let _ = article.preferredLink else {
|
||||||
return false
|
|
||||||
}
|
|
||||||
guard let article = object as? Article else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
guard let _ = article.preferredLink else {
|
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,6 +54,9 @@ final class SendToMicroBlogCommand: SendToCommand {
|
|||||||
s = "[" + s + "](" + link + ")"
|
s = "[" + s + "](" + link + ")"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if let link = article.preferredLink {
|
||||||
|
s = link
|
||||||
|
}
|
||||||
|
|
||||||
guard let encodedString = s.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
|
guard let encodedString = s.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) else {
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user