mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix numerous concurrency warnings.
This commit is contained in:
@@ -20,23 +20,25 @@ import Account
|
||||
|
||||
// MARK: - NSPasteboardWriting
|
||||
|
||||
func writableTypes(for pasteboard: NSPasteboard) -> [NSPasteboard.PasteboardType] {
|
||||
nonisolated func writableTypes(for pasteboard: NSPasteboard) -> [NSPasteboard.PasteboardType] {
|
||||
|
||||
return [.string]
|
||||
}
|
||||
|
||||
func pasteboardPropertyList(forType type: NSPasteboard.PasteboardType) -> Any? {
|
||||
nonisolated func pasteboardPropertyList(forType type: NSPasteboard.PasteboardType) -> Any? {
|
||||
|
||||
let plist: Any?
|
||||
|
||||
switch type {
|
||||
case .string:
|
||||
plist = smartFeed.nameForDisplay
|
||||
default:
|
||||
plist = nil
|
||||
MainActor.assumeIsolated {
|
||||
let plist: Any?
|
||||
|
||||
switch type {
|
||||
case .string:
|
||||
plist = smartFeed.nameForDisplay
|
||||
default:
|
||||
plist = nil
|
||||
}
|
||||
|
||||
return plist
|
||||
}
|
||||
|
||||
return plist
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,9 @@ import Account
|
||||
import Articles
|
||||
import UserNotifications
|
||||
|
||||
final class UserNotificationManager: NSObject {
|
||||
|
||||
override init() {
|
||||
super.init()
|
||||
final class UserNotificationManager: Sendable {
|
||||
|
||||
init() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(accountDidDownloadArticles(_:)), name: .AccountDidDownloadArticles, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(statusesDidChange(_:)), name: .StatusesDidChange, object: nil)
|
||||
registerCategoriesAndActions()
|
||||
@@ -103,5 +102,4 @@ private extension UserNotificationManager {
|
||||
|
||||
UNUserNotificationCenter.current().setNotificationCategories([newArticleCategory])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user