Merge pull request #1533 from hartlco/1517-sharing-article-to-omnifocus-leaves-new-item-title-blank
Share string with subject and URL instead of plain URL for Omnifocus and Things
This commit is contained in:
commit
4184202806
|
@ -23,9 +23,20 @@ class ArticleActivityItemSource: NSObject, UIActivityItemSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any? {
|
func activityViewController(_ activityViewController: UIActivityViewController, itemForActivityType activityType: UIActivity.ActivityType?) -> Any? {
|
||||||
|
guard let activityType = activityType,
|
||||||
|
let subject = subject else {
|
||||||
return url
|
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 {
|
func activityViewController(_ activityViewController: UIActivityViewController, subjectForActivityType activityType: UIActivity.ActivityType?) -> String {
|
||||||
return subject ?? ""
|
return subject ?? ""
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue