diff --git a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift index 8dce7e1ed..c6bd7d04d 100644 --- a/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift +++ b/Frameworks/Account/CloudKit/CloudKitAccountDelegate.swift @@ -421,6 +421,11 @@ final class CloudKitAccountDelegate: AccountDelegate { switch result { case .success(let externalID): account.externalID = externalID + self.refreshAll(for: account) { result in + if case .failure(let error) = result { + os_log(.error, log: self.log, "Error while doing intial refresh: %@", error.localizedDescription) + } + } case .failure(let error): os_log(.error, log: self.log, "Error adding account container: %@", error.localizedDescription) } diff --git a/Mac/Preferences/Accounts/AccountsAddCloudKitWindowController.swift b/Mac/Preferences/Accounts/AccountsAddCloudKitWindowController.swift index 3ce698537..5d0e3202f 100644 --- a/Mac/Preferences/Accounts/AccountsAddCloudKitWindowController.swift +++ b/Mac/Preferences/Accounts/AccountsAddCloudKitWindowController.swift @@ -35,8 +35,7 @@ class AccountsAddCloudKitWindowController: NSWindowController { } @IBAction func create(_ sender: Any) { - let account = AccountManager.shared.createAccount(type: .cloudKit) - account.refreshAll(completion: { _ in }) + let _ = AccountManager.shared.createAccount(type: .cloudKit) hostWindow!.endSheet(window!, returnCode: NSApplication.ModalResponse.OK) } diff --git a/iOS/Account/CloudKitAccountViewController.swift b/iOS/Account/CloudKitAccountViewController.swift index 9c026143a..a72f8203f 100644 --- a/iOS/Account/CloudKitAccountViewController.swift +++ b/iOS/Account/CloudKitAccountViewController.swift @@ -25,8 +25,7 @@ class CloudKitAccountViewController: UITableViewController { } @IBAction func add(_ sender: Any) { - let account = AccountManager.shared.createAccount(type: .cloudKit) - account.refreshAll(completion: { _ in }) + let _ = AccountManager.shared.createAccount(type: .cloudKit) dismiss(animated: true, completion: nil) delegate?.dismiss() }