Update precondition to make sure iCloud doesn't call the wrong update method.

This commit is contained in:
Maurice Parker
2020-04-01 09:19:51 -05:00
parent 9e2ba8a36b
commit 9a1b7f5225

View File

@@ -738,7 +738,7 @@ public final class Account: DisplayNameProvider, UnreadCountProvider, Container,
func update(webFeedIDsAndItems: [String: Set<ParsedItem>], defaultRead: Bool, completion: @escaping DatabaseCompletionBlock) {
// Used only by syncing systems.
precondition(Thread.isMainThread)
precondition(type != .onMyMac) // TODO: also make sure type != iCloud
precondition(type != .onMyMac && type != .cloudKit)
guard !webFeedIDsAndItems.isEmpty else {
completion(nil)
return