mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Continue deleting completion-based functions in SyncDatabase.
This commit is contained in:
@@ -68,7 +68,7 @@ public actor SyncDatabase {
|
||||
return syncStatusTable.selectPendingStarredStatusArticleIDs(database: database)
|
||||
}
|
||||
|
||||
public func resetAllSelectedForProcessing() throws {
|
||||
public func resetAllSelectedForProcessing() throws {
|
||||
|
||||
guard let database else {
|
||||
throw DatabaseError.suspended
|
||||
@@ -179,33 +179,6 @@ public extension SyncDatabase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nonisolated func selectPendingStarredStatusArticleIDs(completion: @escaping SyncStatusArticleIDsCompletionBlock) {
|
||||
|
||||
Task { @MainActor in
|
||||
do {
|
||||
if let articleIDs = try await self.selectPendingStarredStatusArticleIDs() {
|
||||
completion(.success(articleIDs))
|
||||
} else {
|
||||
completion(.success(Set<String>()))
|
||||
}
|
||||
} catch {
|
||||
completion(.failure(DatabaseError.suspended))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nonisolated func resetAllSelectedForProcessing(completion: DatabaseCompletionBlock? = nil) {
|
||||
|
||||
Task { @MainActor in
|
||||
do {
|
||||
try await self.resetAllSelectedForProcessing()
|
||||
completion?(nil)
|
||||
} catch {
|
||||
completion?(DatabaseError.suspended)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension SyncDatabase {
|
||||
|
||||
Reference in New Issue
Block a user