mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Convert createStatusesIfNeeded to async await.
This commit is contained in:
@@ -95,20 +95,6 @@ public extension ArticlesDatabase {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create statuses for specified articleIDs. For existing statuses, don’t do anything.
|
||||
/// For newly-created statuses, mark them as read and not-starred.
|
||||
nonisolated func createStatusesIfNeeded(articleIDs: Set<String>, completion: @escaping DatabaseCompletionBlock) {
|
||||
|
||||
Task {
|
||||
do {
|
||||
try await createStatusesIfNeeded(articleIDs: articleIDs)
|
||||
callDatabaseCompletion(completion)
|
||||
} catch {
|
||||
callDatabaseCompletion(completion, .suspended)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nonisolated private func callUpdateArticlesCompletion(_ completion: @escaping UpdateArticlesCompletionBlock, _ result: UpdateArticlesResult) {
|
||||
|
||||
Task { @MainActor in
|
||||
|
||||
Reference in New Issue
Block a user