mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-04 19:29:41 +00:00
The Sharing Service now uses ListFormatter
This commit is contained in:
1 file changed
+2
-2
@@ -17,12 +17,12 @@ import AppKit
|
||||
}
|
||||
|
||||
func sharingService(_ sharingService: NSSharingService, willShareItems items: [Any]) {
|
||||
sharingService.subject = items
|
||||
let selectedItemTitles = items
|
||||
.compactMap { item in
|
||||
let writer = item as? ArticlePasteboardWriter
|
||||
return writer?.article.title
|
||||
}
|
||||
.joined(separator: ", ")
|
||||
sharingService.subject = ListFormatter().string(from: selectedItemTitles)
|
||||
}
|
||||
|
||||
func sharingService(_ sharingService: NSSharingService, sourceWindowForShareItems items: [Any], sharingContentScope: UnsafeMutablePointer<NSSharingService.SharingContentScope>) -> NSWindow? {
|
||||
|
||||
Reference in new issue
Block a user