Share string with subject and URL instead of plain URL for Omnifocus and Things
This commit is contained in:
parent
a405951f6d
commit
12731c2e39
|
@ -23,9 +23,20 @@ class ArticleActivityItemSource: NSObject, UIActivityItemSource {
|
|||
}
|
||||
|
||||
func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any? {
|
||||
guard let activityType = activityType,
|
||||
let subject = subject else {
|
||||
return url
|
||||
}
|
||||
|
||||
switch activityType.rawValue {
|
||||
case "com.omnigroup.OmniFocus3.iOS.QuickEntry",
|
||||
"com.culturedcode.ThingsiPhone.ShareExtension":
|
||||
return "\(subject)\n\(url)"
|
||||
default:
|
||||
return url
|
||||
}
|
||||
}
|
||||
|
||||
func activityViewController(_ activityViewController: UIActivityViewController, subjectForActivityType activityType: UIActivity.ActivityType?) -> String {
|
||||
return subject ?? ""
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue