mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
The Sharing Service now uses ListFormatter
This commit is contained in:
@@ -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