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:
@@ -22,8 +22,7 @@ public struct AccountSyncError {
|
||||
init(account: Account, error: Error) {
|
||||
self.account = account
|
||||
self.error = error
|
||||
os_log(.error, log: AccountSyncError.log, "%@", error.localizedDescription)
|
||||
os_log(.error, log: Self.log, "%@", error.localizedDescription)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,16 +36,16 @@ class CloudKitRemoteNotificationOperation: MainThreadOperation {
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
os_log(.debug, log: log, "Processing remote notification...")
|
||||
|
||||
accountZone.receiveRemoteNotification(userInfo: userInfo) {
|
||||
articlesZone.receiveRemoteNotification(userInfo: self.userInfo) {
|
||||
os_log(.debug, log: self.log, "Done processing remote notification.")
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
|
||||
Task { @MainActor in
|
||||
|
||||
await accountZone.receiveRemoteNotification(userInfo: userInfo)
|
||||
await articlesZone.receiveRemoteNotification(userInfo: self.userInfo)
|
||||
|
||||
os_log(.debug, log: self.log, "Done processing remote notification.")
|
||||
self.operationDelegate?.operationDidComplete(self)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -804,7 +804,7 @@ extension FeedlyAPICaller: FeedlyMarkArticlesService {
|
||||
var entryIDs: [String]
|
||||
}
|
||||
|
||||
func mark(_ articleIDs: Set<String>, as action: FeedlyMarkAction, completion: @escaping (Result<Void, Error>) -> ()) {
|
||||
func mark(_ articleIDs: Set<String>, as action: FeedlyMarkAction, completion: @escaping @Sendable (Result<Void, Error>) -> ()) {
|
||||
guard !isSuspended else {
|
||||
return DispatchQueue.main.async {
|
||||
completion(.failure(TransportError.suspended))
|
||||
|
||||
@@ -13,8 +13,9 @@ import Core
|
||||
import Feedly
|
||||
|
||||
public protocol OAuthAccountAuthorizationOperationDelegate: AnyObject {
|
||||
func oauthAccountAuthorizationOperation(_ operation: OAuthAccountAuthorizationOperation, didCreate account: Account)
|
||||
func oauthAccountAuthorizationOperation(_ operation: OAuthAccountAuthorizationOperation, didFailWith error: Error)
|
||||
|
||||
@MainActor func oauthAccountAuthorizationOperation(_ operation: OAuthAccountAuthorizationOperation, didCreate account: Account)
|
||||
@MainActor func oauthAccountAuthorizationOperation(_ operation: OAuthAccountAuthorizationOperation, didFailWith error: Error)
|
||||
}
|
||||
|
||||
public enum OAuthAccountAuthorizationOperationError: LocalizedError {
|
||||
|
||||
@@ -98,7 +98,7 @@ public struct OAuthAuthorizationErrorResponse: Error {
|
||||
|
||||
/// Error values as enumerated in section 4.1.2.1 of the OAuth 2.0 Authorization Framework.
|
||||
/// https://tools.ietf.org/html/rfc6749#section-4.1.2.1
|
||||
public enum OAuthAuthorizationError: String {
|
||||
public enum OAuthAuthorizationError: String, Sendable {
|
||||
case invalidRequest = "invalid_request"
|
||||
case unauthorizedClient = "unauthorized_client"
|
||||
case accessDenied = "access_denied"
|
||||
|
||||
Reference in New Issue
Block a user