mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-12-02 10:22:35 +00:00
Delete completion-based selectPendingReadStatusArticleIDs method.
This commit is contained in:
1 parent
951349ffc5
commit
8b84ed6e2f
9 files changed
+87
-140
No files matched your search
@@ -148,37 +148,6 @@ public extension SyncDatabase {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nonisolated func selectPendingCount(completion: @escaping DatabaseIntCompletionBlock) {
|
||||
|
||||
Task { @MainActor in
|
||||
do {
|
||||
if let count = try await self.selectPendingCount() {
|
||||
completion(.success(count))
|
||||
} else {
|
||||
completion(.success(0))
|
||||
}
|
||||
|
||||
} catch {
|
||||
completion(.failure(DatabaseError.suspended))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nonisolated func selectPendingReadStatusArticleIDs(completion: @escaping SyncStatusArticleIDsCompletionBlock) {
|
||||
|
||||
Task { @MainActor in
|
||||
do {
|
||||
if let articleIDs = try await self.selectPendingReadStatusArticleIDs() {
|
||||
completion(.success(articleIDs))
|
||||
} else {
|
||||
completion(.success(Set<String>()))
|
||||
}
|
||||
} catch {
|
||||
completion(.failure(DatabaseError.suspended))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension SyncDatabase {
|
||||
|
||||
Reference in new issue
Block a user