diff --git a/Modules/Account/Sources/Account/Account.swift b/Modules/Account/Sources/Account/Account.swift index 28df121f2..a83862f6e 100644 --- a/Modules/Account/Sources/Account/Account.swift +++ b/Modules/Account/Sources/Account/Account.swift @@ -716,6 +716,19 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container, webFeedDictionariesNeedUpdate = true } + @MainActor func update(_ feed: WebFeed, with parsedFeed: ParsedFeed) async throws -> ArticleChanges { + try await withCheckedThrowingContinuation { continuation in + update(feed, with: parsedFeed) { result in + switch result { + case .success(let articleChanges): + continuation.resume(returning: articleChanges) + case .failure(let error): + continuation.resume(throwing: error) + } + } + } + } + func update(_ webFeed: WebFeed, with parsedFeed: ParsedFeed, _ completion: @escaping UpdateArticlesCompletionBlock) { // Used only by an On My Mac or iCloud account. precondition(Thread.isMainThread)