mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix a few concurrency warnings.
This commit is contained in:
@@ -18,15 +18,18 @@ import Core
|
||||
}
|
||||
|
||||
func sharingServicePicker(_ sharingServicePicker: NSSharingServicePicker, sharingServicesForItems items: [Any], proposedSharingServices proposedServices: [NSSharingService]) -> [NSSharingService] {
|
||||
let filteredServices = proposedServices.filter { $0.menuItemTitle != "NetNewsWire" }
|
||||
return filteredServices + SharingServicePickerDelegate.customSharingServices(for: items)
|
||||
|
||||
MainActor.assumeIsolated {
|
||||
let filteredServices = proposedServices.filter { $0.menuItemTitle != "NetNewsWire" }
|
||||
return filteredServices + SharingServicePickerDelegate.customSharingServices(for: items)
|
||||
}
|
||||
}
|
||||
|
||||
func sharingServicePicker(_ sharingServicePicker: NSSharingServicePicker, delegateFor sharingService: NSSharingService) -> NSSharingServiceDelegate? {
|
||||
return sharingServiceDelegate
|
||||
}
|
||||
|
||||
static func customSharingServices(for items: [Any]) -> [NSSharingService] {
|
||||
@MainActor static func customSharingServices(for items: [Any]) -> [NSSharingService] {
|
||||
let customServices: [SendToCommand] = [SendToMarsEditCommand(), SendToMicroBlogCommand()]
|
||||
|
||||
return customServices.compactMap { (sendToCommand) -> NSSharingService? in
|
||||
|
||||
Reference in New Issue
Block a user