mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Use MainActor Task instead of GCD.
This commit is contained in:
@@ -66,11 +66,11 @@ import RSParser
|
||||
}
|
||||
|
||||
account.createFeed(url: url.absoluteString, name: title, container: container, validateFeed: true) { result in
|
||||
|
||||
DispatchQueue.main.async {
|
||||
|
||||
Task { @MainActor in
|
||||
self.endShowingProgress()
|
||||
}
|
||||
|
||||
|
||||
switch result {
|
||||
case .success(let feed):
|
||||
NotificationCenter.default.post(name: .UserDidAddFeed, object: self, userInfo: [UserInfoKey.feed: feed])
|
||||
@@ -81,7 +81,7 @@ import RSParser
|
||||
case AccountError.createErrorNotFound:
|
||||
self.showNoFeedsErrorMessage()
|
||||
default:
|
||||
DispatchQueue.main.async {
|
||||
Task { @MainActor in
|
||||
NSApplication.shared.presentError(error)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user